X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/579ee70e9524844fb40be41b859a5c2869663cda..796f5749859a1fa48ad068b5f2ab9889e0ae88e8:/ikiwiki-calendar.in?ds=inline diff --git a/ikiwiki-calendar.in b/ikiwiki-calendar.in index 04352b970..d3e31b6db 100755 --- a/ikiwiki-calendar.in +++ b/ikiwiki-calendar.in @@ -1,13 +1,14 @@ #!/usr/bin/perl +no lib '.'; use warnings; use strict; -use lib '.'; # For use in nonstandard directory, munged by Makefile. +use FindBin; use lib $FindBin::Bin; # For use in nonstandard directory, munged by Makefile. use IkiWiki; use IkiWiki::Setup; use Getopt::Long; sub usage () { - die gettext("usage: ikiwiki-calendar [-f] your.setup [pagespec] [year]"), "\n"; + die gettext("usage: ikiwiki-calendar [-f] your.setup [pagespec] [startyear [endyear]]"), "\n"; } my $force=0; @@ -59,8 +60,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}; -exec("ikiwiki", "-setup", $setup, "-refresh"); -die "failed to run ikiwiki -setup $setup -refresh\n"; +exec("ikiwiki", "--setup", $setup, "--refresh"); +die "failed to run ikiwiki --setup $setup --refresh\n";