aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mkdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mkdiff')
-rwxr-xr-xscripts/mkdiff31
1 files changed, 20 insertions, 11 deletions
diff --git a/scripts/mkdiff b/scripts/mkdiff
index 92efcda6a..f17979383 100755
--- a/scripts/mkdiff
+++ b/scripts/mkdiff
@@ -1,25 +1,34 @@
#!/bin/sh
-
-if [ $# = 1 ]; then
- pack="$1"
- vprf=""
-elif [ $# = 2 ] ; then
- pack="$1"
- vprf="$2"
-else
- echo "usage: mkdiff package-name [version-prefix]" >&2
+# Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# Please note that this script is now maintained outside of GNUPG.
+# To get the most up to date version use
+# cvs -d :pserver:[email protected]:/cvs/wk checkout misc-scripts/mkdiff
+
+if [ $# != 1 ] ; then
+ echo "usage: mkdiff package-name" >&2
exit 1
fi
+pack="$1"
+
set -e
-curr_ver=$(ls $pack-${vprf}*.tar.gz 2>/dev/null | sed "s/^$pack-\(.*\)\.tar\.gz/\1/"\
+curr_ver=$(ls $pack-*.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-${vprf}*.tar.gz 2>/dev/null | sed "s/^$pack-\(.*\)\.tar\.gz/\1/"\
+prev_ver=$(ls $pack-*.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