- my @params=(
- "--dumpsetup", $setup{setupfile},
- "--wikiname", $setup{wikiname},
- "--url", $setup{url},
- "--cgiurl", $setup{cgiurl}
- );
- if ($setup{rcs}) {
- push @params, "--rcs", $setup{rcs};
- if ($setup{rcs} eq 'git') {
- push @params, "--set", "git_wrapper=".
- $setup{repository}."/hooks/post-update";
- }
- elsif ($setup{rcs} eq 'svn') {
- push @params, "--set", "svn_wrapper=".
- $setup{repository}."/hooks/post-commit";
- }
- elsif ($setup{rcs} eq 'bzr') {
- # TODO
- }
- elsif ($setup{rcs} eq 'mercurial') {
- # TODO
- }
+ require IkiWiki::Setup;
+ IkiWiki::Setup::dump($config{dumpsetup});
+
+ # Build the wiki, but w/o wrappers, so it's not live yet.
+ mkpath($config{destdir}) || die "mkdir $config{destdir}: $!";
+ if (system("ikiwiki", "--refresh", "--setup", $config{dumpsetup}) != 0) {
+ die "ikiwiki --refresh --setup $config{dumpsetup} failed";