+ else {
+ @command=("ikiwiki", "--setup", $config{setupfile},
+ "--refresh", "--wrappers", "-v");
+ }
+
+ close STDERR;
+ open(STDERR, ">&STDOUT");
+ my $ret=system(@command);
+ print "\n<\/pre>";
+ if ($ret != 0) {
+ print '<p class="error">'.
+ sprintf(gettext("Error: %s exited nonzero (%s). Discarding setup changes."),
+ join(" ", @command), $ret).
+ '</p>';
+ open(OUT, ">", $config{setupfile}) || error("$config{setupfile}: $!");
+ print OUT Encode::encode_utf8($oldsetup);
+ close OUT;
+ }
+
+ print $tail;
+ exit 0;