- if (! $config{refresh}) {
- debug("generating wrappers..");
- my %startconfig=(%config);
- foreach my $wrapper (@{$setup{wrappers}}) {
- %config=(%startconfig, verbose => 0, %setup, %{$wrapper});
- checkconfig();
- gen_wrapper();
- }
- %config=(%startconfig);
- delete $config{wrappers};
- }
- foreach my $c (keys %setup) {
- if (defined $setup{$c}) {
- if (! ref $setup{$c}) {
- $config{$c}=possibly_foolish_untaint($setup{$c});
- }
- elsif (ref $setup{$c} eq 'ARRAY') {
- $config{$c}=[map { possibly_foolish_untaint($_) } @{$setup{$c}}]
- }
- }
- else {
- $config{$c}=undef;
- }
- }
+ my $thisperl = eval q{use Config; $Config{perlpath}};
+ error($@) if $@;
+
+ "#!$thisperl",
+ "#",
+ (map { "# $_" } @_),
+ "use IkiWiki::Setup::Standard {",
+ IkiWiki::Setup::commented_dump(\&dumpline, "\t"),
+ "}"
+}