w32: Allow passing a relative name for the tarball
authorWerner Koch <wk@gnupg.org>
Mon, 16 Jan 2012 17:43:51 +0000 (18:43 +0100)
committerWerner Koch <wk@gnupg.org>
Mon, 16 Jan 2012 17:43:51 +0000 (18:43 +0100)
* scripts/mk-w32-dist: Prepend PWD to TARBALL.

scripts/mk-w32-dist

index aad2728..eb5e655 100755 (executable)
@@ -69,10 +69,11 @@ builddir=w32-build-root
 tarball="$1"
 patchfile="$2"
 
-if [ ! -f "$tarball" -o "$(echo "$tarball" | head -c 1)" != "/" ]; then
-    echo "$PGM: tarball does not exist or has no absolute name" >&2
+if [ ! -f "$tarball" ]; then
+    echo "$PGM: tarball does not exist" >&2
     exit 1
 fi
+[ "$(echo "$tarball" | head -c 1)" != "/" ] && tarball="$(pwd)/$tarball"
 
 if [ -n "$patchfile" -a ! -f "$patchfile" ]; then
     echo "$PGM: patchfile does not exist" >&2