$test_receive=IkiWiki::Receive::gen_wrapper();
}
+ my $check_args=" return 0;";
+ run_hooks(wrapperargcheck => sub { $check_args = shift->(); });
+
my $check_commit_hook="";
my $pre_exec="";
if ($config{post_commit}) {
newenviron[i++]=s;
}
+int checkargs(int argc, char **argv) {
+$check_args
+}
+
int main (int argc, char **argv) {
char *s;
+ if (!checkargs(argc, argv))
+ exit(0);
+
$check_commit_hook
$test_receive
$envsave
}
$pre_exec
- execv("$this", argv);
+ execl("$this", "$this", NULL);
perror("exec $this");
exit(1);
}