X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=ikiwiki-calendar.in;h=60df99855df63a8a248b78616911359035477a1a;hb=3f104d1eb7cc15dec0d3a7a67db85fbe63484281;hp=6b6f693b3ec838b0a52aa402198880a02e9ebfc9;hpb=3131433f64235ad5425eb93d5773580b607876fb;p=ikiwiki.git diff --git a/ikiwiki-calendar.in b/ikiwiki-calendar.in index 6b6f693b3..60df99855 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; @@ -56,7 +59,8 @@ foreach my $y ($startyear..$endyear) { } } -IkiWiki::rcs_commit_staged(gettext("calendar update"), undef, undef) +IkiWiki::rcs_commit_staged(message => gettext("calendar update")) if $config{rcs}; -system("ikiwiki", "-setup", $setup, "-refresh"); +exec("ikiwiki", "-setup", $setup, "-refresh"); +die "failed to run ikiwiki -setup $setup -refresh\n";