]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
fix parameter parsing when pagespec is ommited, and year is present
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 15 Apr 2010 22:51:35 +0000 (18:51 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 15 Apr 2010 22:51:35 +0000 (18:51 -0400)
ikiwiki-calendar.in

index cdfecff3f3a41e2c5c2ff3d2ef9230eb1453d6df..04352b97050905dfd853a3a1b64228137e12dc69 100755 (executable)
@@ -15,7 +15,10 @@ GetOptions(
        "force" => \$force,
 ) || usage();
 my $setup=shift                || usage();
-my $pagespec=shift;
+my $pagespec;
+if (@ARGV && $ARGV[0] !~ /^\d+$/) {
+       $pagespec=shift;
+}
 my $startyear=shift    || 1900+(localtime(time))[5];
 my $endyear=shift      || $startyear;