[svn] GnuPG - r3856 - trunk/tools
svn author dshaw
cvs at cvs.gnupg.org
Fri Aug 5 15:09:33 CEST 2005
Author: dshaw
Date: 2005-08-05 15:09:32 +0200 (Fri, 05 Aug 2005)
New Revision: 3856
Modified:
trunk/tools/ChangeLog
trunk/tools/gpg-zip.in
Log:
* gpg-zip.in: Add --decrypt functionality. Fix quoting so filenames
with spaces work properly.
Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog 2005-08-05 03:30:13 UTC (rev 3855)
+++ trunk/tools/ChangeLog 2005-08-05 13:09:32 UTC (rev 3856)
@@ -1,3 +1,8 @@
+2005-08-05 David Shaw <dshaw at jabberwocky.com>
+
+ * gpg-zip.in: Add --decrypt functionality. Fix quoting so
+ filenames with spaces work properly.
+
2005-08-04 David Shaw <dshaw at jabberwocky.com>
* gpg-zip.in: New. Script wrapper to work with encrypted tar
Modified: trunk/tools/gpg-zip.in
===================================================================
--- trunk/tools/gpg-zip.in 2005-08-05 03:30:13 UTC (rev 3855)
+++ trunk/tools/gpg-zip.in 2005-08-05 13:09:32 UTC (rev 3856)
@@ -29,7 +29,7 @@
GPG=gpg
usage="\
-Usage: gpg-zip [--help] [--version] [--encrypt] [--symmetric]
+Usage: gpg-zip [--help] [--version] [--encrypt] [--decrypt] [--symmetric]
[--list-archive] [--output FILE] [--gpg GPG] [--gpg-args ARGS]
[--tar TAR] [--tar-args ARGS] filename1 [filename2, ...]
directory1 [directory2, ...]
@@ -45,24 +45,35 @@
--list-archive)
list=yes
create=no
+ unpack=no
shift
;;
--encrypt | -e)
gpg_args="$gpg_args --encrypt"
list=no
create=yes
+ unpack=no
shift
;;
+ --decrypt | -d)
+ gpg_args="$gpg_args --decrypt"
+ list=no
+ create=no
+ unpack=yes
+ shift
+ ;;
--symmetric | -c)
gpg_args="$gpg_args --symmetric"
list=no
create=yes
+ unpack=no
shift
;;
--sign | -s)
gpg_args="$gpg_args --sign"
list=no
create=yes
+ unpack=no
shift
;;
--recipient | -r)
@@ -117,11 +128,14 @@
done
if test x$create = xyes ; then
-# echo "$TAR -cf - $* | $GPG --set-filename x.tar $gpg_args" >&2
- $TAR -cf - $* | $GPG --set-filename x.tar $gpg_args
+# echo "$TAR -cf - "$@" | $GPG --set-filename x.tar $gpg_args" 1>&2
+ $TAR -cf - "$@" | $GPG --set-filename x.tar $gpg_args
elif test x$list = xyes ; then
-# echo "cat $1 | $GPG $gpg_args | $TAR $tar_args -tf -" >&2
- cat $1 | $GPG $gpg_args | $TAR $tar_args -tf -
+# echo "cat \"$1\" | $GPG $gpg_args | $TAR $tar_args -tf -" 1>&2
+ cat "$1" | $GPG $gpg_args | $TAR $tar_args -tf -
+elif test x$unpack = xyes ; then
+# echo "cat \"$1\" | $GPG $gpg_args | $TAR $tar_args -xvf -" 1>&2
+ cat "$1" | $GPG $gpg_args | $TAR $tar_args -xvf -
else
echo "$usage" 1>&2
exit 1
More information about the Gnupg-commits
mailing list