aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-08-01 16:02:01 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-08-01 16:45:05 -0400
commitf41448d9caf591ba369bf319297d15552be94678 (patch)
tree2e969bd50f4d49a88ddcfa3b67528d43136bae72 /IkiWiki.pm
parentbb394fdae8ba488f1031d6f053f1544c689a3628 (diff)
downloadikiwiki-f41448d9caf591ba369bf319297d15552be94678.tar
ikiwiki-f41448d9caf591ba369bf319297d15552be94678.tar.gz
rcs plugin loading reorg
Move rcs plugin load to loadplugins; move duplicate rcs detection logic out of individual plugins and into loadplugins. Avoids checkconfig failing when run twice.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm17
1 files changed, 10 insertions, 7 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 6a6e93e7e..bfa85343d 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -412,13 +412,6 @@ sub checkconfig () { #{{{
$config{wikistatedir}="$config{srcdir}/.ikiwiki"
unless exists $config{wikistatedir};
-
- if ($config{rcs}) {
- loadplugin($config{rcs});
- }
- else {
- loadplugin("norcs");
- }
if (defined $config{umask}) {
umask(possibly_foolish_untaint($config{umask}));
@@ -455,6 +448,16 @@ sub loadplugins () { #{{{
}
loadplugin($_) foreach @{$config{default_plugins}}, @{$config{add_plugins}};
+
+ if ($config{rcs}) {
+ if (exists $IkiWiki::hooks{rcs}) {
+ error(gettext("cannot use multiple rcs plugins"));
+ }
+ loadplugin($config{rcs});
+ }
+ if (! exists $IkiWiki::hooks{rcs}) {
+ loadplugin("norcs");
+ }
run_hooks(getopt => sub { shift->() });
if (grep /^-/, @ARGV) {