aboutsummaryrefslogtreecommitdiff
path: root/ikiwiki-calendar.in
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-04-15 18:51:35 -0400
committerJoey Hess <joey@gnu.kitenet.net>2010-04-15 18:51:35 -0400
commit579ee70e9524844fb40be41b859a5c2869663cda (patch)
treed7c4f08430d79da30724bddd7779015157394e33 /ikiwiki-calendar.in
parent50d08bc2aea1d8d52e07ae1750e73b722bd2db24 (diff)
downloadikiwiki-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-xikiwiki-calendar.in5
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;