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-Tag: 3.20120202~15^2~1 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/2c3efbb3cebc6c45b16051683595aa02b701799e?hp=fa99332893ed8ede41857806e2b92ed02ea1c9d8 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 {",