use IkiWiki;
sub usage () { #{{{
- die gettext("usage: ikiwiki [options] source dest"), "\n";
+ die gettext("usage: ikiwiki [options] source dest"), "\n",
+ gettext(" ikiwiki --setup configfile"), "\n";
} #}}}
sub getconfig () { #{{{
IkiWiki::Setup::load($_[1]);
$config{setupverbose}=$config{verbose};
$config{setupsyslog}=$config{syslog};
- $config{verbose}=$verbose;
+ $config{verbose}=$verbose || $config{setupverbose};
$config{syslog}=$syslog;
$config{setup}=1;
},
print "ikiwiki version $IkiWiki::version\n";
exit;
},
+ "help|h" => sub { $SIG{__WARN__}=sub {}; die },
) || usage();
if (! $config{setup} && ! $config{render}) {
error("WRAPPED_OPTIONS: $@");
}
delete $ENV{WRAPPED_OPTIONS};
+
+ # optimisation for no-op post_commit
+ if ($config{post_commit} && ! commit_hook_enabled()) {
+ exit 0;
+ }
+
loadplugins();
checkconfig();
}
# do nothing
}
else {
- if (! $config{refresh}) {
+ if ($config{rebuild}) {
debug(gettext("rebuilding wiki.."));
}
else {