diff --git a/tools/runwait.sh b/tools/runwait.sh index cc2f9b6ecd..8f4353deb9 100755 --- a/tools/runwait.sh +++ b/tools/runwait.sh @@ -1,10 +1,12 @@ #!/bin/sh CommandLine="$@" +ExeName="$1" #set -x echo $CommandLine -ext=${CommandLine#*.} +ext=${ExeName#*.} +echo "ext=$ext" if [ "$ext" = "exe" ]; then echo "Windows Executable detected. Attempting to use WINE..." if [ -x "`which wine`" ]; then @@ -13,7 +15,8 @@ if [ "$ext" = "exe" ]; then echo "WINE not found in path" fi else - "$CommandLine" + shift + "$ExeName" $@ fi echo "--------------------------------------------------"