diff options
author | Werner Koch <wk@gnupg.org> | 1999-09-02 16:50:38 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1999-09-02 16:50:38 +0200 |
commit | 175c9d84bc92d19739cb4613ab698c1cd5c2b1b2 (patch) | |
tree | 0b0a778cc2bb04a930ee4d437d6893d5b870d076 /scripts | |
parent | See ChangeLog: Wed Sep 1 15:30:44 CEST 1999 Werner Koch (diff) | |
download | gnupg2-175c9d84bc92d19739cb4613ab698c1cd5c2b1b2.tar.xz gnupg2-175c9d84bc92d19739cb4613ab698c1cd5c2b1b2.zip |
See ChangeLog: Thu Sep 2 16:40:55 CEST 1999 Werner Koch
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/ChangeLog | 6 | ||||
-rwxr-xr-x | scripts/mkdiff | 68 | ||||
-rwxr-xr-x | scripts/mksnapshot | 26 | ||||
-rwxr-xr-x | scripts/mkwebpage | 8 |
4 files changed, 69 insertions, 39 deletions
diff --git a/scripts/ChangeLog b/scripts/ChangeLog index f602ba426..d26cae273 100644 --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +Thu Sep 2 16:40:55 CEST 1999 Werner Koch <wk@isil.d.shuttle.de> + + + * mkdiff: changed format of diff file name and made script more + general. + Wed Aug 4 10:34:18 CEST 1999 Werner Koch <wk@isil.d.shuttle.de> diff --git a/scripts/mkdiff b/scripts/mkdiff index d180aaade..4f7bfc77a 100755 --- a/scripts/mkdiff +++ b/scripts/mkdiff @@ -1,48 +1,64 @@ #!/bin/sh +if [ $# != 1 ] ; then + echo "usage: mkdiff package-name" >&2 + exit 1 +fi + +pack="$1" + set -e -curr_ver=$(ls gnupg-*.tar.gz | sort -r -t '.' -n +0.4 -1 +1 -2 +2 \ - | head -1 | sed -e 's/gnupg-\(.*\).tar.gz/\1/' ) -prev_ver=$(ls gnupg-*.tar.gz | sort -r -t '.' -n +0.4 -1 +1 -2 +2 \ - | head -2 | tail -1 | sed -e 's/gnupg-\(.*\).tar.gz/\1/' ) +curr_ver=$(ls $pack-*.tar.gz 2>/dev/null | sort -r -t '.' -n +0.4 -1 +1 -2 +2 \ + | head -1 | sed -e 's/'$pack'-\(.*\).tar.gz/\1/' ) +if [ ! -f $pack-$curr_ver.tar.gz ]; then + echo "mkdiff: no current version of package $pack found" >&2 + exit 1 +fi +prev_ver=$(ls $pack-*.tar.gz 2>/dev/null | sort -r -t '.' -n +0.4 -1 +1 -2 +2 \ + | head -2 | tail -1 | sed -e 's/'$pack'-\(.*\).tar.gz/\1/' ) +if [ "$prev_ver" = "$curr_ver" ]; then + echo "mkdiff: no previous version of package $pack found" >&2 + exit 1 +fi + +echo "Current is: $pack-$curr_ver" +echo "Previous is: $pack-$prev_ver" -echo "Current is: $curr_ver" -echo "Previous is: $prev_ver" echo "Removing old directories" -[ -d "gnupg-$curr_ver" ] && rm -rf "gnupg-$curr_ver" -[ -d "gnupg-$prev_ver" ] && rm -rf "gnupg-$prev_ver" +[ -d "$pack-$curr_ver" ] && rm -rf "$pack-$curr_ver" +[ -d "$pack-$prev_ver" ] && rm -rf "$pack-$prev_ver" echo "Unpacking previous and current tar" -tar xzf "gnupg-$curr_ver.tar.gz" -rm -f gnupg-${curr_ver}/po/*.gmo -tar xzf "gnupg-$prev_ver.tar.gz" -rm -f gnupg-${prev_ver}/po/*.gmo +tar xzf "$pack-$curr_ver.tar.gz" +rm -f $pack-${curr_ver}/po/*.gmo +tar xzf "$pack-$prev_ver.tar.gz" +rm -f $pack-${prev_ver}/po/*.gmo echo "Diffing" -tmp_name="gnupg-$curr_ver.diff.tmp" -diff_name="gnupg-$curr_ver.diff" +tmp_name="$pack-$prev_ver-$curr_ver.diff.tmp" +diff_name="$pack-$prev_ver-$curr_ver.diff" -diff -urN "gnupg-$prev_ver/" "gnupg-$curr_ver/" > $tmp_name || true +diff -urN "$pack-$prev_ver/" "$pack-$curr_ver/" > $tmp_name || true echo "Making patch file" cat <<EOF > $diff_name -This is a patch file against $prev_ver. +This is a patch file to create version $curr_ver from $prev_ver. Please check the signature of this patch file: - zcat somepath/gnupg-$curr_ver.diff.gz | gpg --verify + zcat somepath/$pack-$prev_ver-$curr_ver.diff.gz | gpg --verify -Change to directory gnupg-$prev_ver (or however you renamed it) +Change to directory $pack-$prev_ver (or however you renamed it) and give this command: - zcat somepath/gnupg-$curr_ver.diff.gz | patch -p1 + zcat somepath/$pack-$prev_ver-$curr_ver.diff.gz | patch -p1 -It is a good idea to rename your current directory to gnupg-$curr_ver now. +It is a good idea to rename your current directory to $pack-$curr_ver now. @@ -57,17 +73,17 @@ sed -e '/^diff.*VERSION/,/^+[0-9][0-9]*/ d' $tmp_name >> $diff_name rm $tmp_name echo "Signing and compressing patch file" -gpg --clearsign --not-dash-escaped -u "(gnupg sig)" \ +gpg --clearsign --not-dash-escaped -u 57548DCD \ < $diff_name | gzip --best > $diff_name.gz rm $diff_name echo "Checking patch file" -cd gnupg-$prev_ver +cd $pack-$prev_ver zcat ../$diff_name.gz | patch -s -p1 rm $(find . -name "*.orig") 2>/dev/null || true cd .. -if ! diff -urN "gnupg-$prev_ver/" "gnupg-$curr_ver/" >/dev/null ; then +if ! diff -urN "$pack-$prev_ver/" "$pack-$curr_ver/" >/dev/null ; then echo "compare failed" exit 1 fi @@ -79,10 +95,8 @@ fi echo "cleaning up" -rm -rf "gnupg-$curr_ver" -rm -rf "gnupg-$prev_ver" +rm -rf "$pack-$curr_ver" +rm -rf "$pack-$prev_ver" echo "Patch file $diff_name.gz is good." - - diff --git a/scripts/mksnapshot b/scripts/mksnapshot index c766501c9..cca19d98d 100755 --- a/scripts/mksnapshot +++ b/scripts/mksnapshot @@ -1,7 +1,9 @@ #!/bin/sh # Make a snapshot of the CVS head revision -# Fixme: we should either run autoconf here or make a real distribution +exec >>/home/koch/mksnapshot.log 2>&1 + +echo "Started at `date`." set -e ftp_dir=$1 @@ -29,13 +31,23 @@ EOF build_dist () { set +e - nice scripts/autogen.sh && nice ./configure && nice make dist - rm $ftp_dir/gnupg-*snap*-*-*.tar.gz - mv gnupg-*.tar.gz $ftp_dir/ + nice scripts/autogen.sh && nice ./configure && nice make dist + if ! awk ' +/^diff gnupg-snapshot\/VERSION/ { getline; getline; getline; getline; next } +/^Common subdirectories:/ { next } +/~$/ { next } +{ exit 1 } +' ; then + # Okay, we have some changes and it is not only the version number + rm $ftp_dir/gnupg-*snap*-*-*.tar.gz + mv gnupg-*.tar.gz $ftp_dir/ + fi + make distclean set -e } + do_export () { pgm=$1 mod=$2 @@ -46,8 +58,8 @@ do_export () { fix_version $pgm.new if [ -n "$ftp_dir" ]; then here=$(pwd) - cd $pgm.new - build_dist + cd $pgm.new + build_dist cd $here fi [ -d $pgm ] && mv $pgm $pgm.old @@ -62,6 +74,6 @@ do_export () { do_export gnupg-snapshot gnupg - +echo "Ended at `date`." exit 0 diff --git a/scripts/mkwebpage b/scripts/mkwebpage index 6ab4771e9..b39feb176 100755 --- a/scripts/mkwebpage +++ b/scripts/mkwebpage @@ -1,7 +1,5 @@ #!/bin/sh # Make a snapshot of the CVS head revision for the gnupg webpages -# and put them into the FTP directory (so that the mirrors w/o rsync -# can access them set -e @@ -98,9 +96,9 @@ EOF do_export gnupg-www gnupg-www -cd gnupg-www -tar czf /home/ftp/pub/gcrypt/old/webpages.tmp * -mv /home/ftp/pub/gcrypt/old/webpages.tmp /home/ftp/pub/gcrypt/old/webpages.tar.gz +#cd gnupg-www +#tar czf /home/ftp/pub/gcrypt/.old/webpages.tmp * +#mv /home/ftp/pub/gcrypt/old/webpages.tmp /home/ftp/pub/gcrypt/old/webpages.tar.gz exit 0 |