move generic comment into IkiWiki::Setup
parent
522daa7ea8
commit
bbe1f2e493
|
@ -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;
|
||||
|
|
|
@ -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 ($$$$) {
|
||||
|
|
Loading…
Reference in New Issue