diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-09-05 15:59:55 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-09-05 15:59:55 +0200 |
commit | 2bbe66dda7fadf2d08a57e2b0e0fa8841a118c81 (patch) | |
tree | 07c1dc11f3d9f4ae37f865ffef4b2f2ce748a380 /src/wgtpkg-installer.c | |
parent | ab0ac254cc142f25bec0d5a6250856ad15bbbc82 (diff) |
Update version of toolseel_4.99.3eel_4.99.2eel_4.99.1eel/4.99.3eel/4.99.2eel/4.99.14.99.34.99.24.99.1
Change-Id: I82bb06d2be92beb377d6c3cafffae49c65e9f20b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/wgtpkg-installer.c')
-rw-r--r-- | src/wgtpkg-installer.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/wgtpkg-installer.c b/src/wgtpkg-installer.c index 855e28d..6738192 100644 --- a/src/wgtpkg-installer.c +++ b/src/wgtpkg-installer.c @@ -39,6 +39,20 @@ static const char appname[] = "wgtpkg-installer"; static const char *root; static int force; +static void version() +{ + printf( + "\n" + " %s version="AFM_VERSION"\n" + "\n" + " Copyright (C) 2015, 2016, 2017 \"IoT.bzh\"\n" + " AFB comes with ABSOLUTELY NO WARRANTY.\n" + " Licence Apache 2\n" + "\n", + appname + ); +} + static void usage() { printf( @@ -49,6 +63,7 @@ static void usage() " -f force overwriting\n" " -q quiet\n" " -v verbose\n" + " -V version\n" "\n", appname ); @@ -60,6 +75,7 @@ static struct option options[] = { { "help", no_argument, NULL, 'h' }, { "quiet", no_argument, NULL, 'q' }, { "verbose", no_argument, NULL, 'v' }, + { "version", no_argument, NULL, 'V' }, { NULL, 0, NULL, 0 } }; @@ -75,7 +91,7 @@ int main(int ac, char **av) force = 0; for (;;) { - i = getopt_long(ac, av, "hfqvp:", options, NULL); + i = getopt_long(ac, av, "hfqvVp:", options, NULL); if (i < 0) break; switch (i) { @@ -92,6 +108,9 @@ int main(int ac, char **av) case 'v': verbosity++; break; + case 'V': + version(); + return 0; case 'p': rc = grant_permission_list(optarg); if (rc < 0) { |