1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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 <neal@g10code.com>
Co-authored-by: Michael Mönch <michael.moench@marktjagd.de>
GnuPG-bug-id 1351
GnuPG-bug-id 1442
This commit is contained in:
Neal H. Walfield 2016-08-29 10:56:16 -04:00 committed by Justus Winter
parent 82bc22aa13
commit f2acaa5d78

View File

@ -94,7 +94,8 @@ while test $# -gt 0 ; do
exit 0 exit 0
;; ;;
--gpg) --gpg)
GPG=$1 GPG=$2
shift
shift shift
;; ;;
--gpg-args) --gpg-args)
@ -103,7 +104,8 @@ while test $# -gt 0 ; do
shift shift
;; ;;
--tar) --tar)
TAR=$1 TAR=$2
shift
shift shift
;; ;;
--tar-args) --tar-args)
@ -126,8 +128,8 @@ while test $# -gt 0 ; do
done done
if test x$create = xyes ; then if test x$create = xyes ; then
# echo "$TAR -cf - "$@" | $GPG --set-filename x.tar $gpg_args" 1>&2 # echo "$TAR $tar_args -cf - "$@" | $GPG --set-filename x.tar $gpg_args" 1>&2
$TAR -cf - "$@" | $GPG --set-filename x.tar $gpg_args $TAR $tar_args -cf - "$@" | $GPG --set-filename x.tar $gpg_args
elif test x$list = xyes ; then elif test x$list = xyes ; then
# echo "cat \"$1\" | $GPG $gpg_args | $TAR $tar_args -tf -" 1>&2 # echo "cat \"$1\" | $GPG $gpg_args | $TAR $tar_args -tf -" 1>&2
cat "$1" | $GPG $gpg_args | $TAR $tar_args -tf - cat "$1" | $GPG $gpg_args | $TAR $tar_args -tf -