X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-main.git;a=blobdiff_plain;f=src%2Fmain-wgtpkg-pack.c;fp=src%2Fmain-wgtpkg-pack.c;h=5e9a18ffd8bab47d003961369f5e2c9d63fb99d6;hp=e4484971e30bf738efb1101174052399d919cfd1;hb=956e7c57d15bde67d7392aab01a9c0fc6906bbd4;hpb=c5d922d7085c980edad3764687e2488a1b0907d0 diff --git a/src/main-wgtpkg-pack.c b/src/main-wgtpkg-pack.c index e448497..5e9a18f 100644 --- a/src/main-wgtpkg-pack.c +++ b/src/main-wgtpkg-pack.c @@ -31,6 +31,7 @@ #include "wgtpkg-files.h" #include "wgtpkg-workdir.h" #include "wgtpkg-zip.h" +#include "wgtpkg-digsig.h" const char appname[] = "wgtpkg-pack"; @@ -55,7 +56,9 @@ static void usage() "\n" " -o wgtfile the output widget file\n" " -f force overwriting\n" + " -N no auto-sign" " -q quiet\n" + " -S auto-sign" " -v verbose\n" " -V version\n" "\n", @@ -67,7 +70,9 @@ static struct option options[] = { { "output", required_argument, NULL, 'o' }, { "force", no_argument, NULL, 'f' }, { "help", no_argument, NULL, 'h' }, + { "no-auto-sign",no_argument, NULL, 'N' }, { "quiet", no_argument, NULL, 'q' }, + { "auto-sign", no_argument, NULL, 'S' }, { "verbose", no_argument, NULL, 'v' }, { "version", no_argument, NULL, 'V' }, { NULL, 0, NULL, 0 } @@ -76,12 +81,13 @@ static struct option options[] = { /* install the widgets of the list */ int main(int ac, char **av) { - int i, force; + int i, force, autosign; char *wgtfile, *directory, *x; struct stat s; LOGUSER(appname); + autosign = 1; force = 0; wgtfile = directory = NULL; for (;;) { @@ -105,9 +111,15 @@ int main(int ac, char **av) case 'h': usage(); return 0; + case 'N': + autosign = 0; + break; case 'V': version(); return 0; + case 'S': + autosign = 1; + break; case ':': ERROR("missing argument"); return 1; @@ -174,10 +186,12 @@ int main(int ac, char **av) if (set_workdir(".", 0)) return 1; - if (fill_files()) return 1; + if (autosign && create_auto_digsig() < 0) + return 1; + return !!zwrite(wgtfile); }