summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-05 23:34:20 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-22 22:30:01 -0800
commitacee3b71b38ba4bcdd0b46557546e22dcdc320cb (patch)
tree80c0c7b14c09bf1de9db504b973768f592c1b07f
parentad85d2eb4e44f21e8e38aa3bdec4acb139989218 (diff)
downloadiceauth-acee3b71b38ba4bcdd0b46557546e22dcdc320cb.tar.gz
Add -V flag to print version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--iceauth.c4
-rw-r--r--man/iceauth.man2
2 files changed, 6 insertions, 0 deletions
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