aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-30 07:41:26 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-30 07:41:26 +0000
commit0f45548333c19d33d885b4417fa85285d74f87cf (patch)
treeada30fde9eeb99fbe5c238ff20ea30857b99d190 /IkiWiki.pm
parent7e35ad2cd91a1abc20b7baff30d8c9e713e9d1e9 (diff)
downloadikiwiki-0f45548333c19d33d885b4417fa85285d74f87cf.tar
ikiwiki-0f45548333c19d33d885b4417fa85285d74f87cf.tar.gz
allow hooks to add options even to --setup
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index b5707195b..2face7082 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -104,6 +104,12 @@ sub loadplugins () { #{{{
error("Failed to load plugin $mod: $@");
}
}
+ run_hooks(getopt => sub { shift->() });
+ if (grep /^-/, @ARGV) {
+ print STDERR "Unknown option: $_\n"
+ foreach grep /^-/, @ARGV;
+ usage();
+ }
} #}}}
sub error ($) { #{{{