]> granicus.if.org Git - pgbadger/commitdiff
If there is just one argument, assume it is the logfile and use default value for...
authorDarold <gilles@darold.net>
Sun, 15 Apr 2012 15:41:05 +0000 (17:41 +0200)
committerDarold <gilles@darold.net>
Sun, 15 Apr 2012 15:41:05 +0000 (17:41 +0200)
pgbadger

index 1fb08367ecd690130cd7725f55f8c07c67b59f85..3248852191b171b952b203885f37d99c793e0c7b 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -78,6 +78,12 @@ if ($ver) {
        exit 0;
 }
 &usage() if ($help);
+# If we just have one command line argument assume it's the log file
+# and use default values for all other ones.
+if ($#ARGV == 0) {
+       $logfile = shift(@ARGV);
+}
+# Logfile is a mandatory parameter
 if (!$logfile) {
        print STDERR "FATAL: you must set a log file. See option -l.\n\n";
        &usage();