X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/b7f64d884cd8bd8e1d9e8fb75735530d4c8a135d..7a0ff2b29397f3d5d5068c5e49e5bea08e128642:/IkiWiki/Wrapper.pm diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index d72368446..7d27abd06 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -4,6 +4,7 @@ use warnings; use strict; use Cwd q{abs_path}; use Data::Dumper; +use IkiWiki; package IkiWiki; @@ -35,7 +36,7 @@ sub gen_wrapper () { #{{{ asprintf(&newenviron[i++], "%s=%s", "$var", s); EOF } - if ($config{svn} && $config{notify}) { + if ($config{rcs} eq "svn" && $config{notify}) { # Support running directly as hooks/post-commit by passing # $2 in REV in the environment. $envsave.=<<"EOF" @@ -46,10 +47,15 @@ EOF EOF } + # This is only set by plugins, which append to it on startup, so + # avoid storing it in the wrapper. + $config{headercontent}=""; + $Data::Dumper::Indent=0; # no newlines my $configstring=Data::Dumper->Dump([\%config], ['*config']); $configstring=~s/\\/\\\\/g; $configstring=~s/"/\\"/g; + $configstring=~s/\n/\\\n/g; open(OUT, ">$wrapper.c") || error("failed to write $wrapper.c: $!");; print OUT <<"EOF";