aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpg-connect-agent.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2008-05-26 12:00:55 +0000
committerWerner Koch <[email protected]>2008-05-26 12:00:55 +0000
commit203ea19408f83296e52ab09d1380f59455cbc8ce (patch)
treebff9fafec151e20ff4ba45fd872ea417a2e7c775 /tools/gpg-connect-agent.c
parentFix --output option used when with --export-secret-kety-p12. (diff)
downloadgnupg-203ea19408f83296e52ab09d1380f59455cbc8ce.tar.gz
gnupg-203ea19408f83296e52ab09d1380f59455cbc8ce.zip
Make --runtime option of gpgconf under W32 work.
Diffstat (limited to 'tools/gpg-connect-agent.c')
-rw-r--r--tools/gpg-connect-agent.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c
index c76f0e219..2f173f930 100644
--- a/tools/gpg-connect-agent.c
+++ b/tools/gpg-connect-agent.c
@@ -1134,6 +1134,7 @@ main (int argc, char **argv)
char *condition;
} loopstack[20];
int loopidx;
+ char **cmdline_commands = NULL;
gnupg_rl_initialize ();
set_strusage (my_strusage);
@@ -1191,7 +1192,7 @@ main (int argc, char **argv)
}
}
else if (argc)
- usage (1);
+ cmdline_commands = argv;
if (opt.exec && opt.raw_socket)
log_info (_("option \"%s\" ignored due to \"%s\"\n"),
@@ -1279,6 +1280,16 @@ main (int argc, char **argv)
else
log_fatal ("/end command vanished\n");
}
+ else if (cmdline_commands && *cmdline_commands && !script_fp)
+ {
+ keep_line = 0;
+ xfree (line);
+ line = xstrdup (*cmdline_commands);
+ cmdline_commands++;
+ n = strlen (line);
+ if (n >= maxlength)
+ maxlength = 0;
+ }
else if (use_tty && !script_fp)
{
keep_line = 0;