When generating scripts, give them the interpreter we generated them with.
[ikiwiki.git] / IkiWiki / Setup / Standard.pm
index c8506930475a0c28ead9e613e7cde64d982b6db9..ea7d763bbd26435c9dfb9462e1930f4cf7920b7a 100644 (file)
@@ -14,7 +14,10 @@ sub import {
 sub gendump ($@) {
        my $class=shift;
 
-       "#!/usr/bin/perl",
+       my $thisperl = eval q{use Config; $Config{perlpath}};
+       error($@) if $@;
+
+       "#!$thisperl",
        "#",
        (map { "# $_" } @_),
        "use IkiWiki::Setup::Standard {",