git://git.jankratochvil.net
/
nethome.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge .rpmorig and .rpmnew files.
[nethome.git]
/
bin
/
rpmmerge
1
#! /bin/sh
2
# $Id$
3
4
set -ex
5
for base in "$@";do
6
base=`echo $base|sed 's/[.]rpmnew$//'`
7
test -f $base
8
test -f $base.rpmnew
9
test ! -f $base.orig
10
test ! -f $base.rej
11
12
if test ! -f $base-orig
13
then
14
cmp $base $base.rpmnew
15
mv -f $base.rpmnew $base
16
continue
17
fi
18
19
if diff -u $base-orig $base.rpmnew | patch -f $base
20
then
21
test ! -f $base.rej
22
rm -f $base.orig
23
mv -f $base.rpmnew $base-orig
24
continue
25
fi
26
test -f $base.orig
27
test -f $base.rej
28
mv -f $base.orig $base
29
rm -f $base.rej
30
exit 1
31
done
32
echo OK