From cfd8537c854d3c5dbe0e8ead564db43ede014b98 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Oct 2008 09:26:55 +0100 Subject: [PATCH] Update replace_interpreter to be useful again. --HG-- extra : convert_revision : 81f531985148c2a9377b7917acabdbba6c5c58a1 --- helper-templates/replace-interpreter.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/helper-templates/replace-interpreter.sh b/helper-templates/replace-interpreter.sh index f54014e6b1c..4126817d5fe 100644 --- a/helper-templates/replace-interpreter.sh +++ b/helper-templates/replace-interpreter.sh @@ -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}."