static struct option long_options[] = {
{"version", no_argument, 0, 'v'},
{"help", no_argument, 0, 'h'},
- {"html", no_argument, 0, 't'},
+ {"html", required_argument, 0, 't'},
{"debug", no_argument, 0, 'd'},
{"status", required_argument, 0, 's'},
{0, 0, 0, 0}
int output_html = 0;
char *package_status = NULL;
int cmdok = 1;
+ char *output_dir = NULL;
program_name = argv[0];
- while ((optc = getopt_long(argc, argv, "vhtds:", long_options,
+ while ((optc = getopt_long(argc, argv, "vht:ds:", long_options,
NULL)) != -1) {
switch (optc) {
case 't':
output_html = 1;
+ output_dir = strdup(optarg);
break;
case 'd':
debug = 1;
ppa = argv[optind+1];
if (output_html)
- ppa_to_html(owner, ppa, package_status);
+ ppa_to_html(owner, ppa, package_status, output_dir);
else
display_published_binaries(owner, ppa, package_status);
/* for valgrind.... */
free(package_status);
+ free(output_dir);
lp_ws_cleanup();
cache_cleanup();