From 579ee70e9524844fb40be41b859a5c2869663cda Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Apr 2010 18:51:35 -0400 Subject: [PATCH] fix parameter parsing when pagespec is ommited, and year is present --- ikiwiki-calendar.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ikiwiki-calendar.in b/ikiwiki-calendar.in index cdfecff3f..04352b970 100755 --- a/ikiwiki-calendar.in +++ b/ikiwiki-calendar.in @@ -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; -- 2.26.2