my $file=IkiWiki::possibly_foolish_untaint(shift);
require IkiWiki::Setup::Standard;
+ my @dump=IkiWiki::Setup::Standard::gendump("Setup file for ikiwiki.");
open (OUT, ">", $file) || die "$file: $!";
- print OUT "$_\n" foreach IkiWiki::Setup::Standard::gendump();
+ print OUT "$_\n" foreach @dump;
close OUT;
}
return @ret;
} #}}}
-sub gendump () { #{{{
+sub gendump ($) { #{{{
+ my $description=shift;
my %setup=(%config);
my @ret;
push @ret, "";
}
- unshift @ret, "#!/usr/bin/perl
-# Setup file for ikiwiki.
-# Passing this to ikiwiki --setup will make ikiwiki generate wrappers and
-# build the wiki.
-#
-# Remember to re-run ikiwiki --setup any time you edit this file.
-
-use IkiWiki::Setup::Standard {";
+ unshift @ret,
+ "#!/usr/bin/perl",
+ "# $description",
+ "#",
+ "# Passing this to ikiwiki --setup will make ikiwiki generate",
+ "# wrappers and build the wiki.",
+ "#",
+ "# Remember to re-run ikiwiki --setup any time you edit this file.",
+ "use IkiWiki::Setup::Standard {";
push @ret, "}";
return @ret;