Tools: Fix handling program parameters in runwait.sh. Issue #40045, patch by Dean Mustakinov.

This commit is contained in:
Juha 2022-12-23 09:41:28 +02:00
parent edbe283fc6
commit 5ea4a1e270

View File

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