+
+ _generate_and_configure_post_commit_hook();
+}
+
+sub _generate_and_configure_post_commit_hook {
+ $config{cvs_wrapper} = $config{cvsrepo} . "/CVSROOT/test-post";
+ $config{wrapper} = $config{cvs_wrapper};
+
+ require IkiWiki::Wrapper;
+ {
+ no warnings 'once';
+ $IkiWiki::program_to_wrap = 'ikiwiki.out';
+ # XXX substitute its interpreter to Makefile's $(PERL)
+ # XXX best solution: do this to all scripts during build
+ }
+ IkiWiki::gen_wrapper();
+
+ my $cvs = "cvs -d $config{cvsrepo}";
+ my $dn = ">/dev/null";
+
+ system "mkdir $config{destdir} $dn";
+ system "cd $dir && $cvs co CVSROOT $dn && cd CVSROOT && " .
+ "echo 'DEFAULT $config{cvsrepo}/CVSROOT/test-post %{sVv} &' "
+ . " >> loginfo && "
+ . "$cvs commit -m 'test repo setup' $dn && "
+ . "cd .. && rm -rf CVSROOT";