/*
- Copyright 2015 IoT.bzh
+ Copyright (C) 2015-2018 IoT.bzh
author: José Bollo <jose.bollo@iot.bzh>
#include <sys/stat.h>
#include <fcntl.h>
+#include <libxml/tree.h>
+
#include "verbose.h"
-#include "wgtpkg.h"
+#include "wgtpkg-files.h"
+#include "wgtpkg-workdir.h"
+#include "wgtpkg-digsig.h"
+#include "wgtpkg-xmlsec.h"
#if !defined(MAXCERT)
#define MAXCERT 20
return (unsigned int)val;
}
+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(
" -f force overwriting\n"
" -q quiet\n"
" -v verbose\n"
+ " -V version\n"
"\n",
appname
);
{ "help", no_argument, NULL, 'h' },
{ "quiet", no_argument, NULL, 'q' },
{ "verbose", no_argument, NULL, 'v' },
+ { "version", no_argument, NULL, 'V' },
{ NULL, 0, NULL, 0 }
};
number = UINT_MAX;
keyfile = directory = NULL;
for (;;) {
- i = getopt_long(ac, av, "hfqvak:c:d:", options, NULL);
+ i = getopt_long(ac, av, "hfqvVak:c:d:", options, NULL);
if (i < 0)
break;
switch (i) {
case 'f': force = 1; continue;
case 'a': author = 1; continue;
case 'h': usage(); return 0;
+ case 'V': version(); return 0;
case 'q':
if (verbosity)
verbosity--;