From: Jean-Philippe Orsini Date: Sun, 26 Jun 2011 20:53:23 +0000 (+0000) Subject: -o for output dir option X-Git-Tag: v1.3.0~162 X-Git-Url: https://git.wpitchoune.net/gitweb/?p=ppastats.git;a=commitdiff_plain;h=5adddce0257ccc16fd348ae398129baafa0dda96 -o for output dir option --- diff --git a/src/main.c b/src/main.c index 1629053..f7b615a 100644 --- a/src/main.c +++ b/src/main.c @@ -86,7 +86,7 @@ static void display_published_binaries(const char *owner, static struct option long_options[] = { {"version", no_argument, 0, 'v'}, {"help", no_argument, 0, 'h'}, - {"html", required_argument, 0, 't'}, + {"output_dir", required_argument, 0, 'o'}, {"debug", no_argument, 0, 'd'}, {"status", required_argument, 0, 's'}, {0, 0, 0, 0} @@ -122,8 +122,8 @@ static void print_help() puts(""); puts("\ - -t, --html \ -generates an HTML output."); + -o, --output_dir=[PATH] \ +generates HTML pages into 'PATH'."); puts(""); @@ -144,10 +144,10 @@ int main(int argc, char **argv) program_name = argv[0]; - while ((optc = getopt_long(argc, argv, "vht:ds:", long_options, + while ((optc = getopt_long(argc, argv, "vho:ds:", long_options, NULL)) != -1) { switch (optc) { - case 't': + case 'o': output_html = 1; output_dir = strdup(optarg); break;