summaryrefslogtreecommitdiffstats
path: root/tools/gpgtar.c
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2015-11-26 17:05:12 +0100
committerJustus Winter <justus@g10code.com>2015-11-26 17:05:12 +0100
commit676b2d7081291f7e47a66755ab07af259fea130b (patch)
tree302dda6bb3a06964c5ce2b8d2370e3a9bf3241bf /tools/gpgtar.c
parenttools/gpgtar: Handle '--gpg-args'. (diff)
downloadgnupg2-676b2d7081291f7e47a66755ab07af259fea130b.tar.xz
gnupg2-676b2d7081291f7e47a66755ab07af259fea130b.zip
tools/gpgtar: Add '--dry-run'.
* tools/gpgtar-extract.c (extract_{regular,directory}): Honor '--dry-run'. * tools/gpgtar.c (enum cmd_and_opt_values): New value. (opts): Add '--dry-run'. (parse_arguments): Handle '--dry-run'. * tools/gpgtar.h (opt): Add field 'dry_run'. Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'tools/gpgtar.c')
-rw-r--r--tools/gpgtar.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/gpgtar.c b/tools/gpgtar.c
index 90fee054e..a46a3398c 100644
--- a/tools/gpgtar.c
+++ b/tools/gpgtar.c
@@ -77,6 +77,9 @@ enum cmd_and_opt_values
/* Compatibility with gpg-zip. */
oGpgArgs,
oTarArgs,
+
+ /* Debugging. */
+ oDryRun,
};
@@ -100,6 +103,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (oQuiet, "quiet", N_("be somewhat more quiet")),
ARGPARSE_s_s (oGpgProgram, "gpg", "@"),
ARGPARSE_s_n (oSkipCrypto, "skip-crypto", N_("skip the crypto processing")),
+ ARGPARSE_s_n (oDryRun, "dry-run", N_("do not make any changes")),
ARGPARSE_s_s (oSetFilename, "set-filename", "@"),
ARGPARSE_s_n (oOpenPGP, "openpgp", "@"),
ARGPARSE_s_n (oCMS, "cms", "@"),
@@ -377,6 +381,10 @@ parse_arguments (ARGPARSE_ARGS *pargs, ARGPARSE_OPTS *popts)
}
break;
+ case oDryRun:
+ opt.dry_run = 1;
+ break;
+
default: pargs->err = 2; break;
}
}