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