lilypond-1.3.130
[lilypond.git] / bin / make_patch
blob4c98e9f35afa1249d6d49d53ec7edec5643aea84
1 #!/bin/sh
3 case $# in
4 0) echo make_patch old new name
5 exit 1;;
6 esac
8 old=$1
9 new=$2
10 nm=$3-
12 newarc=../releases/$nm$new.tar.gz
13 oldarc=../releases/$nm$old.tar.gz
16 if [ ! -x $nm$new ]
17 then
18 echo untarring ..
19 if [ ! -f $newarc ]
20 then
21 echo cant find $newarc
22 exit
24 tar zfx $newarc
26 if [ ! -x $nm$old ]
27 then
28 echo untarring
30 if [ ! -f $oldarc ]
31 then
32 echo cant find $oldarc
33 exit
35 tar zfx $oldarc
38 # not interested in auto generated files.
39 for a in lilypond.lsm INSTALL.text AUTHORS.text lilypond.spec configure; do
40 rm `find $nm$old $nm$new -name $a`
41 done
43 cat <<EOF > patch-$new
44 Generated with
46 make_patch $1 $2 $3
48 usage
50 cd lilypond-source-dir; patch -E -p0 < patch-$new
52 Patches do not contain automatically generated files,
53 i.e. you should rerun configure
54 EOF
56 (cd $nm$new; diff -urN ../$nm$old . >> ../patch-$new)
57 rm -rf $nm$old $nm$new