Update replace_interpreter to be useful again.
--HG-- extra : convert_revision : 81f531985148c2a9377b7917acabdbba6c5c58a1
This commit is contained in:
parent
c429d26452
commit
cfd8537c85
|
@ -23,25 +23,22 @@ replace_interpreter()
|
||||||
case $lang in
|
case $lang in
|
||||||
bash)
|
bash)
|
||||||
orsb=$bash_regexp
|
orsb=$bash_regexp
|
||||||
trpath="$XBPS_MASTERDIR/bin/bash"
|
trpath="/bin/bash"
|
||||||
;;
|
;;
|
||||||
perl)
|
perl)
|
||||||
orsb=$perl_regexp
|
orsb=$perl_regexp
|
||||||
trpath="$XBPS_MASTERDIR/bin/perl"
|
trpath="/usr/bin/perl"
|
||||||
;;
|
;;
|
||||||
python)
|
python)
|
||||||
orsb=$python_regexp
|
orsb=$python_regexp
|
||||||
trpath="$XBPS_MASTERDIR/bin/python"
|
trpath="/usr/bin/python"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -f $wrksrc/$file ]; then
|
if [ -f $wrksrc/$file ]; then
|
||||||
$sed_cmd -e "1s|^#![[:space:]]*${orsb}|#!${trpath}|" \
|
sed -i -e "1s|^#![[:space:]]*${orsb}|#!${trpath}|" $file && \
|
||||||
$wrksrc/$file > $wrksrc/$file.in && \
|
|
||||||
$mv_cmd $wrksrc/$file.in $wrksrc/$file && \
|
|
||||||
$chmod_cmd a+x $wrksrc/$file && \
|
|
||||||
echo "=> Transformed $lang script: ${file##$wrksrc}."
|
echo "=> Transformed $lang script: ${file##$wrksrc}."
|
||||||
else
|
else
|
||||||
echo "=> Ignoring unexistent $lang script: ${file##$wrksrc}."
|
echo "=> Ignoring unexistent $lang script: ${file##$wrksrc}."
|
||||||
|
|
Loading…
Reference in New Issue