File: genpatch

package info (click to toggle)
orsa 0.7.0-7
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,296 kB
  • ctags: 4,012
  • sloc: cpp: 27,150; sh: 8,377; ansic: 4,440; makefile: 299; xml: 63
file content (56 lines) | stat: -rwxr-xr-x 704 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#! /bin/bash

OLD=orsa
NEW=orsa.0

[ "$1" ] && OLD=$1
[ "$2" ] && NEW=$2
[ ! -d "$OLD" ] && echo "Directory '$OLD' doesn't exist" >&2 && exit
[ ! -d "$NEW" ] && echo "Directory '$NEW' doesn't exist" >&2 && exit

list=`mktemp`
fw_list=`mktemp`
diffopt="-ruN --exclude-from=$list"

# do not try to diff the files below
cat >> $list <<EOF
*~
*.mak
*.log
*.pro
*.nsi
*.kdevses
*.Po
*.Plo
_win32
_tmp
log
CVS
Doxyfile
Makefile
Makefile.in
autom4te.cache
aclocal.m4
stamp-h1
config.h.in
config.guess
config.status
config.sub
configure
depcomp
missing
libtool
mkinstalldirs
install-sh
ltmain.sh
config.h
EOF

p=$NEW.patch
rm -f $p
for n in .; do
	diff $diffopt $OLD/$n $NEW/$n >> $p
done

rm -f $list $fw_list