Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add more trail regression tests
[git.ikiwiki.info.git]
/
IkiWiki
/
Setup
/
Standard.pm
diff --git
a/IkiWiki/Setup/Standard.pm
b/IkiWiki/Setup/Standard.pm
index 9c177e497ae105a4e8646c40425cfc46f8a25644..ea7d763bbd26435c9dfb9462e1930f4cf7920b7a 100644
(file)
--- a/
IkiWiki/Setup/Standard.pm
+++ b/
IkiWiki/Setup/Standard.pm
@@
-1,6
+1,4
@@
#!/usr/bin/perl
#!/usr/bin/perl
-# Standard ikiwiki setup module.
-# Parameters to import should be all the standard ikiwiki config stuff.
package IkiWiki::Setup::Standard;
package IkiWiki::Setup::Standard;
@@
-8,24
+6,23
@@
use warnings;
use strict;
use IkiWiki;
use strict;
use IkiWiki;
+# Parameters to import should be all the standard ikiwiki config, in a hash.
sub import {
IkiWiki::Setup::merge($_[1]);
}
sub import {
IkiWiki::Setup::merge($_[1]);
}
-sub gendump ($
$
) {
+sub gendump ($
@
) {
my $class=shift;
my $class=shift;
- my $description=shift;
- "#!/usr/bin/perl",
- "# $description",
- "#",
- "# Passing this to ikiwiki --setup will make ikiwiki generate",
- "# wrappers and build the wiki.",
+ my $thisperl = eval q{use Config; $Config{perlpath}};
+ error($@) if $@;
+
+ "#!$thisperl",
"#",
"#",
-
"# Remember to re-run ikiwiki --setup any time you edit this file."
,
+
(map { "# $_" } @_)
,
"use IkiWiki::Setup::Standard {",
"use IkiWiki::Setup::Standard {",
- IkiWiki::Setup::commented_dump(\&dumpline),
- "}"
;
+ IkiWiki::Setup::commented_dump(\&dumpline
, "\t"
),
+ "}"
}
sub dumpline ($$$$) {
}
sub dumpline ($$$$) {