Use a default argument for --write-env-file.

This commit is contained in:
Werner Koch 2005-08-16 09:15:09 +00:00
parent 3919421a4f
commit 0a09a6316e
3 changed files with 15 additions and 2 deletions

4
NEWS
View File

@ -1,3 +1,7 @@
Noteworthy changes in version 1.9.19
-------------------------------------------------
Noteworthy changes in version 1.9.18 (2005-08-01)
-------------------------------------------------

View File

@ -1,3 +1,7 @@
2005-08-16 Werner Koch <wk@g10code.com>
* gpg-agent.c (main): Use a default file name for --write-env-file.
2005-07-25 Werner Koch <wk@g10code.com>
* findkey.c (agent_public_key_from_file): Fixed array assignment.

View File

@ -152,7 +152,7 @@ static ARGPARSE_OPTS opts[] = {
{ oAllowPresetPassphrase, "allow-preset-passphrase", 0,
N_("allow presetting passphrase")},
{ oSSHSupport, "enable-ssh-support", 0, N_("enable ssh-agent emulation") },
{ oWriteEnvFile, "write-env-file", 2,
{ oWriteEnvFile, "write-env-file", 2|8,
N_("|FILE|write environment settings also to FILE")},
{0}
};
@ -633,7 +633,12 @@ main (int argc, char **argv )
case oKeepDISPLAY: opt.keep_display = 1; break;
case oSSHSupport: opt.ssh_support = 1; break;
case oWriteEnvFile: env_file_name = pargs.r.ret_str; break;
case oWriteEnvFile:
if (pargs.r_type)
env_file_name = pargs.r.ret_str;
else
env_file_name = make_filename ("~/.gpg-agent-info", NULL);
break;
default : pargs.err = configfp? 1:2; break;
}