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)
|
first=$(dd if="$fn" count=2 bs=1 2> /dev/null)
|
||||||
if test "$first" = "#!"; then
|
if test "$first" = "#!"; then
|
||||||
echo "patching $fn..."
|
echo "patching $fn..."
|
||||||
sed < "$fn" > "$fn".tmp \
|
sed -i "$fn" -e "s|^#\!\(.*[ /]perl.*\)$|#\!\1$perlFlags|"
|
||||||
-e "s|^#\!\(.*/perl.*\)$|#\! \1$perlFlags|"
|
|
||||||
if test -x "$fn"; then chmod +x "$fn".tmp; fi
|
|
||||||
mv "$fn".tmp "$fn"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user