[Pkg-wmaker-commits] [wmbattery] 180/241: wmbattery: Add -v option to display version number.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:37:57 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmbattery.

commit 7b358cc61c252ae8dd7c52cd129939772c89bfba
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Sun Oct 5 10:30:04 2014 -0500

    wmbattery: Add -v option to display version number.
    
    Also, in order to facilitate this, keep track of version number in configure.ac.
    It was previously only mentioned in ChangeLog.
---
 configure.ac | 2 +-
 wmbattery.c  | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4d2163e..dc15b2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(wmbattery.c)
+AC_INIT(wmbattery.c, 2.44)
 AC_CONFIG_HEADER(config.h)
 
 AC_CONFIG_AUX_DIR(autoconf)
diff --git a/wmbattery.c b/wmbattery.c
index 3a0482e..26fd283 100644
--- a/wmbattery.c
+++ b/wmbattery.c
@@ -314,7 +314,7 @@ char *parse_commandline(int argc, char *argv[])
 	char *s;
 
 	while (c != -1) {
-		c = getopt(argc, argv, "hd:g:if:b:w:c:l:es:a:x:");
+		c = getopt(argc, argv, "hd:g:if:b:w:c:l:es:a:x:v");
 		switch (c) {
 		case 'h':
 			printf("Usage: wmbattery [options]\n");
@@ -330,6 +330,7 @@ char *parse_commandline(int argc, char *argv[])
 			printf("\t-s granularity\tignore fluctuations less than granularity%% (implies -e)\n");
 			printf("\t-a file\t\twhen critical send file to /dev/audio\n");
 			printf("\t-x command\twhen critical execute this command\n");
+			printf("\t-v\t\tdisplay version number\n");
 			exit(0);
 			break;
 		case 'd':
@@ -374,6 +375,10 @@ char *parse_commandline(int argc, char *argv[])
 		case 'x':
 			crit_command = strdup(optarg);
 			break;
+		case 'v':
+			printf("wmbattery "PACKAGE_VERSION"\n");
+			exit(0);
+			break;
 		}
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbattery.git



More information about the Pkg-wmaker-commits mailing list