X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fmain.c;h=b590c67169ac52511ddbd110d829b84a01565079;hb=0303d0d705cfc2a100403a708fca0e93b12d2a93;hp=e1f17d52aef2fcab05d4d64780981a82e1ab2d41;hpb=b59ec44bffce28192c6408fed838c4d593a17c82;p=ppastats.git diff --git a/src/main.c b/src/main.c index e1f17d5..b590c67 100644 --- a/src/main.c +++ b/src/main.c @@ -26,11 +26,12 @@ #include #include "cache.h" +#include #include "html.h" #include "http.h" -#include "log.h" #include "lp_ws.h" #include "config.h" +#include #include "ppastats.h" static const char *program_name; @@ -198,17 +199,24 @@ int main(int argc, char **argv) } if (!cmdok || optind + 2 != argc) { - fprintf(stderr, _("Try `%s --help' for more information.\n"), + fprintf(stderr, + _("Try `%s --help' for more information.\n"), program_name); exit(EXIT_FAILURE); } + log_open("ppastats.log"); + owner = argv[optind]; ppa = argv[optind+1]; if (output_html) - ppa_to_html(owner, ppa, package_status, output_dir, - install_static_files, ws_size); + ppa_to_html(owner, + ppa, + package_status, + output_dir, + install_static_files, + ws_size); else display_published_binaries(owner, ppa, package_status, ws_size); @@ -217,6 +225,8 @@ int main(int argc, char **argv) free(output_dir); http_cleanup(); cache_cleanup(); + fcache_cleanup(); + html_cleanup(); exit(EXIT_SUCCESS); }