From: <mee...@us...> - 2004-03-06 16:18:59
|
Update of /cvsroot/sc2/sc2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14130 Modified Files: subst Log Message: Better checking whether the script is executed from bash. Should work on more platforms now. Index: subst =================================================================== RCS file: /cvsroot/sc2/sc2/subst,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** subst 3 Feb 2003 17:43:35 -0000 1.3 --- subst 6 Mar 2004 15:56:08 -0000 1.4 *************** *** 4,13 **** # We need bash functionality. Executing bash with the shebang won't be # portable as the location of bash differs. ! SHELLFILE="$_" ! case "$SHELLFILE" in ! sh|*/sh) ! exec bash "$0" "$@" ! ;; ! esac if [ $# -eq 0 ]; then --- 4,10 ---- # We need bash functionality. Executing bash with the shebang won't be # portable as the location of bash differs. ! if [ -z "$BASH_VERSION" ]; then ! exec bash "$0" "$@" ! fi if [ $# -eq 0 ]; then |