From cc42b31b9cacb8f93e25f7f6f2f384775bbc89be Mon Sep 17 00:00:00 2001 From: meep-eep Date: Sat, 6 Mar 2004 15:56:08 +0000 Subject: [PATCH] Better checking whether the script is executed from bash. Should work on more platforms now. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1347 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/subst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sc2/subst b/sc2/subst index aa6329475..16a5209cb 100755 --- a/sc2/subst +++ b/sc2/subst @@ -3,12 +3,9 @@ # 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 [ -z "$BASH_VERSION" ]; then + exec bash "$0" "$@" +fi if [ $# -eq 0 ]; then {