diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-04-15 18:51:35 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-04-15 18:51:35 -0400 |
commit | 579ee70e9524844fb40be41b859a5c2869663cda (patch) | |
tree | d7c4f08430d79da30724bddd7779015157394e33 /ikiwiki-calendar.in | |
parent | 50d08bc2aea1d8d52e07ae1750e73b722bd2db24 (diff) | |
download | ikiwiki-579ee70e9524844fb40be41b859a5c2869663cda.tar ikiwiki-579ee70e9524844fb40be41b859a5c2869663cda.tar.gz |
fix parameter parsing when pagespec is ommited, and year is present
Diffstat (limited to 'ikiwiki-calendar.in')
-rwxr-xr-x | ikiwiki-calendar.in | 5 |
1 files changed, 4 insertions, 1 deletions
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; |