diff options
author | Werner Koch <wk@gnupg.org> | 1999-12-08 22:03:03 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1999-12-08 22:03:03 +0100 |
commit | 4555c0be941cef55486b7a1644d9b70f4ea50c77 (patch) | |
tree | 1a10627bf31163f9aef5040724c53f75e8daf3e6 /scripts | |
parent | See ChangeLog: Fri Nov 19 17:15:20 CET 1999 Werner Koch (diff) | |
download | gnupg2-4555c0be941cef55486b7a1644d9b70f4ea50c77.tar.xz gnupg2-4555c0be941cef55486b7a1644d9b70f4ea50c77.zip |
See ChangeLog: Wed Dec 8 21:58:32 CET 1999 Werner Koch
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/mkdiff | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/mkdiff b/scripts/mkdiff index 6fad6c188..92efcda6a 100755 --- a/scripts/mkdiff +++ b/scripts/mkdiff @@ -1,21 +1,25 @@ #!/bin/sh -if [ $# != 1 ] ; then - echo "usage: mkdiff package-name" >&2 +if [ $# = 1 ]; then + pack="$1" + vprf="" +elif [ $# = 2 ] ; then + pack="$1" + vprf="$2" +else + echo "usage: mkdiff package-name [version-prefix]" >&2 exit 1 fi -pack="$1" - set -e -curr_ver=$(ls $pack-*.tar.gz 2>/dev/null | sed "s/^$pack-\(.*\)\.tar\.gz/\1/"\ +curr_ver=$(ls $pack-${vprf}*.tar.gz 2>/dev/null | sed "s/^$pack-\(.*\)\.tar\.gz/\1/"\ | sort -r -t '.' -n +0 -1 +1 -2 +2 | head -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 | sed "s/^$pack-\(.*\)\.tar\.gz/\1/"\ +prev_ver=$(ls $pack-${vprf}*.tar.gz 2>/dev/null | sed "s/^$pack-\(.*\)\.tar\.gz/\1/"\ | sort -r -t '.' -n +0 -1 +1 -2 +2 | head -2 | tail -1 ) if [ "$prev_ver" = "$curr_ver" ]; then echo "mkdiff: no previous version of package $pack found" >&2 |