summaryrefslogtreecommitdiff
path: root/bin/make-patch
blob: e11d7b8533f9f81f7d48ae88330ebff175f66edf (about) (plain)
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
57
#!/bin/sh

case $# in
0) echo make_patch old new name
	exit 1;;
esac

old=$1
new=$2
nm=$3-

newarc=../releases/$nm$new.tar.gz
oldarc=../releases/$nm$old.tar.gz


if [ ! -x  $nm$new ]
then
   echo untarring ..
  if [ ! -f $newarc ]
  then
	echo "can't find $newarc"
	exit
  fi
  tar zfx $newarc
fi
if [ ! -x  $nm$old ]
then
   echo untarring

  if [ ! -f $oldarc ]
  then
	echo "can't find $oldarc"
	exit
  fi
   tar zfx $oldarc
fi

# not interested in auto generated files.
for a in lilypond.lsm INSTALL.text AUTHORS.text lilypond.spec configure; do
    rm `find  $nm$old $nm$new  -name $a`
done    

cat <<EOF > patch-$new
Generated with 

	make_patch $1 $2 $3

usage 

	cd lilypond-source-dir; patch -E -p0 < patch-$new
	
Patches do not contain automatically generated files, 
i.e. you should rerun configure
EOF

(cd $nm$new; diff -urN  ../$nm$old . >> ../patch-$new)
rm -rf $nm$old $nm$new