]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge branch 'master' of git://github.com/joeyh/ikiwiki
authorAmitai Schlair <schmonz@magnetic-babysitter.(none)>
Thu, 10 Sep 2009 19:03:18 +0000 (15:03 -0400)
committerAmitai Schlair <schmonz@magnetic-babysitter.(none)>
Thu, 10 Sep 2009 19:03:18 +0000 (15:03 -0400)
1  2 
IkiWiki.pm
IkiWiki/Wrapper.pm

diff --cc IkiWiki.pm
Simple merge
index 0baf112ffd722c3ca133c92be2dd5982e01801ab,cf85738d68163763e8ac2bb1c7fc2ab04ef69187..57896e262fbef9cd08b74dc76ef0a26a9cb7ffdb
@@@ -38,15 -38,13 +38,16 @@@ sub gen_wrapper () 
  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 -120,8 +127,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";