mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
doc/
2008-05-26 Marcus Brinkmann <marcus@ulysses.g10code.com> * tools.texi (Invoking gpgconf): Document --list-dirs. tools/ 2008-05-26 Marcus Brinkmann <marcus@ulysses.g10code.com> * gpgconf.c (enum cmd_and_opt_values): Add aListDirs. (opts): Add aListDirs option. (main): Handle aListDirs. * gpgconf.h (gc_percent_escape): New declaration. * gpgconf-comp.c (my_percent_escape): Make non-static and rename to ... (gc_percent_escape): ... this. Change all callers.
This commit is contained in:
parent
203ea19408
commit
9c10eb6625
6 changed files with 54 additions and 17 deletions
|
@ -46,7 +46,8 @@ enum cmd_and_opt_values
|
|||
aCheckOptions,
|
||||
aApplyDefaults,
|
||||
aListConfig,
|
||||
aCheckConfig
|
||||
aCheckConfig,
|
||||
aListDirs
|
||||
|
||||
};
|
||||
|
||||
|
@ -63,6 +64,8 @@ static ARGPARSE_OPTS opts[] =
|
|||
{ aCheckOptions, "check-options", 256, N_("|COMPONENT|check options") },
|
||||
{ aApplyDefaults, "apply-defaults", 256,
|
||||
N_("apply global default values") },
|
||||
{ aListDirs, "list-dirs", 256,
|
||||
N_("get the configuration directories for gpgconf") },
|
||||
{ aListConfig, "list-config", 256,
|
||||
N_("list global configuration file") },
|
||||
{ aCheckConfig, "check-config", 256,
|
||||
|
@ -165,6 +168,7 @@ main (int argc, char **argv)
|
|||
case oVerbose: opt.verbose++; break;
|
||||
case oNoVerbose: opt.verbose = 0; break;
|
||||
|
||||
case aListDirs:
|
||||
case aListComponents:
|
||||
case aCheckPrograms:
|
||||
case aListOptions:
|
||||
|
@ -253,6 +257,13 @@ main (int argc, char **argv)
|
|||
if (gc_process_gpgconf_conf (NULL, 1, 1, NULL))
|
||||
exit (1);
|
||||
break;
|
||||
|
||||
case aListDirs:
|
||||
/* Show the system configuration directory for gpgconf. */
|
||||
get_outfp (&outfp);
|
||||
fprintf (outfp, "sysconfdir:%s\n",
|
||||
gc_percent_escape (gnupg_sysconfdir ()));
|
||||
break;
|
||||
}
|
||||
|
||||
if (outfp && outfp != stdout)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue