From: Joey Hess Date: Thu, 10 Sep 2009 20:18:23 +0000 (-0400) Subject: Merge branch 'master' into cvs X-Git-Tag: 3.14159265~72 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=93cd30bc0a882037ae2c65c8d6d3a9dc3d09c899;p=ikiwiki.git Merge branch 'master' into cvs --- 93cd30bc0a882037ae2c65c8d6d3a9dc3d09c899 diff --cc IkiWiki/Wrapper.pm index 0baf112ff,ff110b5ff..53ac5099a --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@@ -37,16 -37,10 +37,13 @@@ sub gen_wrapper () addenv("$var", s); EOF } - - my $test_receive=""; - if ($config{test_receive}) { - require IkiWiki::Receive; - $test_receive=IkiWiki::Receive::gen_wrapper(); - } + + my @wrapper_hooks; + run_hooks(genwrapper => sub { push @wrapper_hooks, shift->() }); + my $check_args=" return 0;"; + run_hooks(wrapperargcheck => sub { $check_args = shift->(); }); + my $check_commit_hook=""; my $pre_exec=""; if ($config{post_commit}) { @@@ -126,11 -116,8 +123,11 @@@ $check_arg int main (int argc, char **argv) { char *s; + if (!checkargs(argc, argv)) + exit(0); + $check_commit_hook - $test_receive + @wrapper_hooks $envsave newenviron[i++]="HOME=$ENV{HOME}"; newenviron[i++]="WRAPPED_OPTIONS=$configstring";