Added -S option (patch submitted by Lekensteyn).
[ppastats.git] / src / main.c
index 75116e2..c17bc25 100644 (file)
@@ -89,6 +89,7 @@ static struct option long_options[] = {
        {"output-dir", required_argument, 0, 'o'},
        {"debug", no_argument, 0, 'd'},
        {"status", required_argument, 0, 's'},
+       {"skip-js-css", no_argument, 0, 'S'},
        {0, 0, 0, 0}
 };
 
@@ -130,6 +131,8 @@ generates HTML pages into 'PATH'.");
                                (possible values are: Pending, Published, \n\
                                Superseded, Deleted or Obsolete).");
 
+       puts("\
+  -S, --skip-js-css            skip installation of js and css files");
        puts("");
 
        printf("Report bugs to: %s\n", PACKAGE_BUGREPORT);
@@ -146,10 +149,11 @@ int main(int argc, char **argv)
        char *package_status = NULL;
        int cmdok = 1;
        char *output_dir = NULL;
+       int install_static_files = 1;
 
        program_name = argv[0];
 
-       while ((optc = getopt_long(argc, argv, "vho:ds:", long_options,
+       while ((optc = getopt_long(argc, argv, "vho:ds:S", long_options,
                                   NULL)) != -1) {
                switch (optc) {
                case 'o':
@@ -169,6 +173,9 @@ int main(int argc, char **argv)
                        if (optarg)
                                package_status = strdup(optarg);
                        break;
+               case 'S':
+                       install_static_files = 0;
+                       break;
                default:
                        cmdok = 0;
                        break;
@@ -185,7 +192,8 @@ int main(int argc, char **argv)
        ppa = argv[optind+1];
 
        if (output_html)
-               ppa_to_html(owner, ppa, package_status, output_dir);
+               ppa_to_html(owner, ppa, package_status, output_dir,
+                           install_static_files);
        else
                display_published_binaries(owner, ppa, package_status);