From acee3b71b38ba4bcdd0b46557546e22dcdc320cb Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 5 Nov 2013 23:34:20 -0800 Subject: Add -V flag to print version Signed-off-by: Alan Coopersmith Reviewed-by: Gaetan Nadon --- iceauth.c | 4 ++++ man/iceauth.man | 2 ++ 2 files changed, 6 insertions(+) diff --git a/iceauth.c b/iceauth.c index e729ed5..c1688c0 100644 --- a/iceauth.c +++ b/iceauth.c @@ -63,6 +63,7 @@ usage (void) " -q turn off extra messages\n" " -i ignore locks on authority file\n" " -b break locks on authority file\n" +" -V print version and exit\n" "\n" "and commands have the following syntax:\n"; static const char suffixmsg[] = @@ -104,6 +105,9 @@ main (int argc, char *argv[]) if (++i >= argc) usage (); authfilename = argv[i]; continue; + case 'V': /* -V */ + printf("%s\n", PACKAGE_STRING); + exit(0); case 'v': /* -v */ verbose = 1; continue; diff --git a/man/iceauth.man b/man/iceauth.man index c91fc24..2621b23 100644 --- a/man/iceauth.man +++ b/man/iceauth.man @@ -51,6 +51,8 @@ on the \fIiceauth\fP command line, or in scripts. .PP \fB\-u\fP Print basic usage instructions .PP +\fB\-V\fP Print version and exit +.PP .SH USAGE .PP When \fIiceauth\fP is run it will allow the following set of commands -- cgit v1.2.1