From 2c3efbb3cebc6c45b16051683595aa02b701799e Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 8 Jan 2012 12:06:56 -0500 Subject: [PATCH] When generating scripts, give them the interpreter we generated them with. --- IkiWiki/Setup/Standard.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 {", -- 2.26.2