mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
perl generic builder: recognize #!/usr/bin/env perl
This commit is contained in:
parent
774559a0ca
commit
dbeffe38e8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user