move generic comment into IkiWiki::Setup
parent
522daa7ea8
commit
bbe1f2e493
|
@ -52,7 +52,14 @@ sub dump ($) {
|
||||||
|
|
||||||
eval qq{require $config{setuptype}};
|
eval qq{require $config{setuptype}};
|
||||||
error $@ if $@;
|
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: $!";
|
open (OUT, ">", $file) || die "$file: $!";
|
||||||
print OUT "$_\n" foreach @dump;
|
print OUT "$_\n" foreach @dump;
|
||||||
|
|
|
@ -12,20 +12,15 @@ sub import {
|
||||||
IkiWiki::Setup::merge($_[1]);
|
IkiWiki::Setup::merge($_[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub gendump ($$) {
|
sub gendump ($@) {
|
||||||
my $class=shift;
|
my $class=shift;
|
||||||
my $description=shift;
|
|
||||||
|
|
||||||
"#!/usr/bin/perl",
|
"#!/usr/bin/perl",
|
||||||
"# $description",
|
|
||||||
"#",
|
"#",
|
||||||
"# Passing this to ikiwiki --setup will make ikiwiki generate",
|
(map { "# $_" } @_),
|
||||||
"# wrappers and build the wiki.",
|
|
||||||
"#",
|
|
||||||
"# Remember to re-run ikiwiki --setup any time you edit this file.",
|
|
||||||
"use IkiWiki::Setup::Standard {",
|
"use IkiWiki::Setup::Standard {",
|
||||||
IkiWiki::Setup::commented_dump(\&dumpline),
|
IkiWiki::Setup::commented_dump(\&dumpline),
|
||||||
"}";
|
"}"
|
||||||
}
|
}
|
||||||
|
|
||||||
sub dumpline ($$$$) {
|
sub dumpline ($$$$) {
|
||||||
|
|
Loading…
Reference in New Issue