From: Amitai Schlair Date: Sun, 8 Jan 2012 17:06:56 +0000 (-0500) Subject: When generating scripts, give them the interpreter we generated them with. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2c3efbb3cebc6c45b16051683595aa02b701799e;p=ikiwiki.git When generating scripts, give them the interpreter we generated them with. --- diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm index c85069304..ea7d763bb 100644 --- a/IkiWiki/Setup/Standard.pm +++ b/IkiWiki/Setup/Standard.pm @@ -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 {",