From a248f83ea89f5d4df35fcdc1e07ef147f72c9cf6 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 19 Oct 2012 22:29:41 -0700 Subject: Add -V option to print version and exit Can't use -v, as that's already in use for verbosity level Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer --- scope.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scope.c') diff --git a/scope.c b/scope.c index d3aa86f..1919569 100644 --- a/scope.c +++ b/scope.c @@ -670,6 +670,7 @@ Usage(void) " [-D]\n" " [-I] -- start in interactive mode\n" " [-S] -- start/stop on SIGUSR1\n" + " [-V] -- output version information and exit\n" " [-t] -- terminate when all clients close\n"); exit(1); } @@ -727,6 +728,10 @@ ScanArgs(int argc, char **argv) ScopeEnabled = atoi(++*argv); break; + case 'V': /* print version & exit */ + printf("%s\n", PACKAGE_STRING); + exit(0); + case 'q': /* quiet mode */ XVerbose = 0; debug(1, (stderr, "Verbose = %d\n", XVerbose)); -- cgit v1.2.1