diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-30 07:41:26 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-30 07:41:26 +0000 |
commit | 0f45548333c19d33d885b4417fa85285d74f87cf (patch) | |
tree | ada30fde9eeb99fbe5c238ff20ea30857b99d190 /IkiWiki.pm | |
parent | 7e35ad2cd91a1abc20b7baff30d8c9e713e9d1e9 (diff) | |
download | ikiwiki-0f45548333c19d33d885b4417fa85285d74f87cf.tar ikiwiki-0f45548333c19d33d885b4417fa85285d74f87cf.tar.gz |
allow hooks to add options even to --setup
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 6 |
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 ($) { #{{{ |