+ delete $config{setup};
+ loadplugins();
+ checkconfig();
+
+ if (@{$config{wrappers}} &&
+ ! $config{render} && ! $config{dumpsetup} &&
+ ! $config{clean} &&
+ ((! $config{refresh} && ! $config{post_commit})
+ || $config{genwrappers})) {
+ require IkiWiki::Wrapper;
+ gen_wrappers();
+ }
+
+ # setup implies a wiki rebuild by default
+ if (! $config{refresh} && ! $config{render} &&
+ ! $config{post_commit} && ! $config{clean}) {
+ $config{rebuild}=1;
+ }
+ }
+
+ if ($config{changesetup}) {
+ require IkiWiki::Setup;
+ IkiWiki::Setup::dump($config{changesetup});
+ }
+
+ if ($config{dumpsetup}) {
+ $config{srcdir}="" if ! defined $config{srcdir};
+ $config{destdir}="" if ! defined $config{destdir};
+ $config{syslog}=1 if $config{setupsyslog};