X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/0eabe6f79498e3339205aeff2c79ae1e85498ab4..7481329bdd11d81c4b3e85a446ab1e4bfcc298c8:/IkiWiki/Wrapper.pm diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index bd134c9a3..927368fae 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -8,6 +8,26 @@ use File::Spec; use Data::Dumper; use IkiWiki; +sub gen_wrappers () { + debug(gettext("generating wrappers..")); + my %origconfig=(%config); + foreach my $wrapper (@{$config{wrappers}}) { + %config=(%origconfig, %{$wrapper}); + $config{verbose}=$config{setupverbose} + if exists $config{setupverbose}; + $config{syslog}=$config{setupsyslog} + if exists $config{setupsyslog}; + delete @config{qw(setupsyslog setupverbose wrappers genwrappers rebuild)}; + checkconfig(); + if (! $config{cgi} && ! $config{post_commit} && + ! $config{test_receive}) { + $config{post_commit}=1; + } + gen_wrapper(); + } + %config=(%origconfig); +} + sub gen_wrapper () { $config{srcdir}=File::Spec->rel2abs($config{srcdir}); $config{destdir}=File::Spec->rel2abs($config{destdir});