aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2016-08-29 14:56:16 +0000
committerJustus Winter <[email protected]>2016-11-02 12:16:52 +0000
commitf2acaa5d785a29eca629c4b3df739bc474249004 (patch)
treed8615b887db85528a57f49d5f02a2753f0aaf189
parentpo: Update Norwegian translation (diff)
downloadgnupg-f2acaa5d785a29eca629c4b3df739bc474249004.tar.gz
gnupg-f2acaa5d785a29eca629c4b3df739bc474249004.zip
tools: Fix option parsing for gpg-zip.
* tools/gpg-zip.in: Correctly set GPG when --gpg is specified. Correctly set TAR when --tar is specified. Pass TAR_ARGS to tar. (cherry-picked by dkg from master branch's 84ebf15b06e435453b2f58775f97a3a1c61a7e55) -- Signed-off-by: Neal H. Walfield <[email protected]> Co-authored-by: Michael Mönch <[email protected]> GnuPG-bug-id 1351 GnuPG-bug-id 1442
-rw-r--r--tools/gpg-zip.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/gpg-zip.in b/tools/gpg-zip.in
index d27b1f962..a6b423877 100644
--- a/tools/gpg-zip.in
+++ b/tools/gpg-zip.in
@@ -94,7 +94,8 @@ while test $# -gt 0 ; do
exit 0
;;
--gpg)
- GPG=$1
+ GPG=$2
+ shift
shift
;;
--gpg-args)
@@ -103,7 +104,8 @@ while test $# -gt 0 ; do
shift
;;
--tar)
- TAR=$1
+ TAR=$2
+ shift
shift
;;
--tar-args)
@@ -126,8 +128,8 @@ while test $# -gt 0 ; do
done
if test x$create = xyes ; then
-# echo "$TAR -cf - "$@" | $GPG --set-filename x.tar $gpg_args" 1>&2
- $TAR -cf - "$@" | $GPG --set-filename x.tar $gpg_args
+# echo "$TAR $tar_args -cf - "$@" | $GPG --set-filename x.tar $gpg_args" 1>&2
+ $TAR $tar_args -cf - "$@" | $GPG --set-filename x.tar $gpg_args
elif test x$list = xyes ; then
# echo "cat \"$1\" | $GPG $gpg_args | $TAR $tar_args -tf -" 1>&2
cat "$1" | $GPG $gpg_args | $TAR $tar_args -tf -