From bc23b38c32d7a38940c50abb98c8f18b439ff93e Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Thu, 23 Apr 2015 02:14:46 -0300 Subject: cli: added -v --- src/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 1966b47..634999c 100644 --- a/src/main.c +++ b/src/main.c @@ -43,6 +43,7 @@ blogc_print_help(void) "\n" "optional arguments:\n" " -h show this help message and exit\n" + " -v show version and exit\n" " -l build listing page, from multiple source files\n" " -t TEMPLATE template file\n" " -o OUTPUT output file\n"); @@ -52,7 +53,7 @@ blogc_print_help(void) static void blogc_print_usage(void) { - printf("usage: blogc [-h] [-l] -t TEMPLATE [-o OUTPUT] SOURCE [SOURCE ...]\n"); + printf("usage: blogc [-h] [-v] [-l] -t TEMPLATE [-o OUTPUT] SOURCE [SOURCE ...]\n"); } @@ -107,6 +108,9 @@ main(int argc, char **argv) case 'h': blogc_print_help(); goto cleanup; + case 'v': + printf("%s\n", PACKAGE_STRING); + goto cleanup; case 'l': listing = true; break; -- cgit v1.2.3-18-g5258