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
|
||||
bash)
|
||||
orsb=$bash_regexp
|
||||
trpath="$XBPS_MASTERDIR/bin/bash"
|
||||
trpath="/bin/bash"
|
||||
;;
|
||||
perl)
|
||||
orsb=$perl_regexp
|
||||
trpath="$XBPS_MASTERDIR/bin/perl"
|
||||
trpath="/usr/bin/perl"
|
||||
;;
|
||||
python)
|
||||
orsb=$python_regexp
|
||||
trpath="$XBPS_MASTERDIR/bin/python"
|
||||
trpath="/usr/bin/python"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -f $wrksrc/$file ]; then
|
||||
$sed_cmd -e "1s|^#![[:space:]]*${orsb}|#!${trpath}|" \
|
||||
$wrksrc/$file > $wrksrc/$file.in && \
|
||||
$mv_cmd $wrksrc/$file.in $wrksrc/$file && \
|
||||
$chmod_cmd a+x $wrksrc/$file && \
|
||||
sed -i -e "1s|^#![[:space:]]*${orsb}|#!${trpath}|" $file && \
|
||||
echo "=> Transformed $lang script: ${file##$wrksrc}."
|
||||
else
|
||||
echo "=> Ignoring unexistent $lang script: ${file##$wrksrc}."
|
||||
|
|
Loading…
Reference in New Issue
Block a user