From 9827f766ec8dacf50e3bca40b27c0c45a21de970 Mon Sep 17 00:00:00 2001 From: myon Date: Fri, 18 Jul 2008 13:42:10 +0000 Subject: [PATCH] Add -h option to keyanalyze, and update manpage. (Closes: #370570) git-svn-id: svn://svn.debian.org/pgp-tools/trunk@391 b513b33f-fedd-0310-b452-c3deb5f4c849 --- debian/changelog | 5 +++-- keyanalyze/keyanalyze.1 | 9 ++++++++- keyanalyze/keyanalyze.c | 6 +++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7c2cbbd..542f803 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,11 +11,12 @@ signing-party (1.1-1) UNRELEASED; urgency=low (Closes: #309101) + Update config.{sub,guess}. (Closes: #365148) + Add patch by Stephan Beyer to improve process_keys' input parsing, - remedying to need of weird grep and sed commands. (Closes: #370571) + remedying the need of weird grep and sed commands. (Closes: #370571) + + Add -h option to keyanalyze, and update manpage. (Closes: #370570) * Put examples in .../examples/$prog, not the other way round. * Use dh_lintian. - -- Christoph Berg Fri, 18 Jul 2008 15:30:06 +0200 + -- Christoph Berg Fri, 18 Jul 2008 15:41:28 +0200 signing-party (1.0-2) unstable; urgency=low diff --git a/keyanalyze/keyanalyze.1 b/keyanalyze/keyanalyze.1 index c162b28..d2fdba2 100644 --- a/keyanalyze/keyanalyze.1 +++ b/keyanalyze/keyanalyze.1 @@ -12,7 +12,7 @@ keyanalyze \- Web of Trust analysis .SH SYNTAX -\fBkeyanalyze\fP [ \fB\-i\fP \fIinfile\fP ] [ \fB\-o\fP \fIoutdir\fP ] [ \fB\-1\fP ] +\fBkeyanalyze\fP [ \fB\-h1\fP ] [ \fB\-i\fP \fIinfile\fP ] [ \fB\-o\fP \fIoutdir\fP ] .SH DESCRIPTION \fIkeyanalyze\fP analyses the web of trust within a group of keys. It @@ -20,6 +20,10 @@ takes preprocessed keys as input (see .BR process_keys (1)) and produces an output directory full of statistics about the keys. +Usually called like + $ pgpring -S -k ./keyring.gpg | process_keys > preprocess.keys + $ keyanalyze + .SH OPTIONS .TP .BI \-i " infile" @@ -29,6 +33,9 @@ Read from \fIinfile\fP instead of \fBpreprocess.keys\fP. Put the results in \fIoutdir\fP instead of \fBoutput/\fP. The directory will be created if it does not already exist. .TP +.BI \-h +Print help. +.TP .BI \-1 Per default, \fBkeyanalyze\fP writes the output into subdirectories named after the first two characters of the key ID. This options disables this; useful for diff --git a/keyanalyze/keyanalyze.c b/keyanalyze/keyanalyze.c index 91d19a5..3a4aa45 100644 --- a/keyanalyze/keyanalyze.c +++ b/keyanalyze/keyanalyze.c @@ -293,10 +293,14 @@ void ParseArgs(int argc, char **argv) int outdirlen; while (1) { - int option = getopt(argc, argv, "i:o:1"); + int option = getopt(argc, argv, "hi:o:1"); if (option == -1) break; switch (option) { + case 'h': + printf ("Usage: %s [-h1] [-i infile] [-o outdir]\n", argv[0]); + exit (0); + break; case 'i': infile = optarg; break; -- 2.39.5