X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/3131433f64235ad5425eb93d5773580b607876fb..93cf1db7b9655a64aec6ab17b7192e5e7429f12e:/ikiwiki-calendar.in?ds=inline diff --git a/ikiwiki-calendar.in b/ikiwiki-calendar.in index 6b6f693b3..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; @@ -59,4 +62,5 @@ foreach my $y ($startyear..$endyear) { IkiWiki::rcs_commit_staged(gettext("calendar update"), undef, undef) if $config{rcs}; -system("ikiwiki", "-setup", $setup, "-refresh"); +exec("ikiwiki", "-setup", $setup, "-refresh"); +die "failed to run ikiwiki -setup $setup -refresh\n";