move generic comment into IkiWiki::Setup

master
Joey Hess 2010-03-19 15:35:21 -04:00
parent 522daa7ea8
commit bbe1f2e493
2 changed files with 11 additions and 9 deletions

View File

@ -52,7 +52,14 @@ sub dump ($) {
eval qq{require $config{setuptype}};
error $@ if $@;
my @dump=$config{setuptype}->gendump("Setup file for ikiwiki.");
my @dump=$config{setuptype}->gendump(
"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.",
);
open (OUT, ">", $file) || die "$file: $!";
print OUT "$_\n" foreach @dump;

View File

@ -12,20 +12,15 @@ sub import {
IkiWiki::Setup::merge($_[1]);
}
sub gendump ($$) {
sub gendump ($@) {
my $class=shift;
my $description=shift;
"#!/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.",
(map { "# $_" } @_),
"use IkiWiki::Setup::Standard {",
IkiWiki::Setup::commented_dump(\&dumpline),
"}";
"}"
}
sub dumpline ($$$$) {