From dbeffe38e805355f76a9db9a711298c01d41c2ad Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Fri, 15 Dec 2017 19:07:56 +0100 Subject: [PATCH] perl generic builder: recognize #!/usr/bin/env perl --- pkgs/development/perl-modules/generic/builder.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/development/perl-modules/generic/builder.sh b/pkgs/development/perl-modules/generic/builder.sh index 09b50e564110..1b8888dd3ceb 100644 --- a/pkgs/development/perl-modules/generic/builder.sh +++ b/pkgs/development/perl-modules/generic/builder.sh @@ -17,10 +17,7 @@ preConfigure() { first=$(dd if="$fn" count=2 bs=1 2> /dev/null) if test "$first" = "#!"; then echo "patching $fn..." - sed < "$fn" > "$fn".tmp \ - -e "s|^#\!\(.*/perl.*\)$|#\! \1$perlFlags|" - if test -x "$fn"; then chmod +x "$fn".tmp; fi - mv "$fn".tmp "$fn" + sed -i "$fn" -e "s|^#\!\(.*[ /]perl.*\)$|#\!\1$perlFlags|" fi fi done