diff --git a/launch-dedicated.sh b/launch-dedicated.sh index 8e69f6c068..cbcb50a523 100755 --- a/launch-dedicated.sh +++ b/launch-dedicated.sh @@ -7,7 +7,7 @@ # Read the file to see which settings you can override ENGINEDIR=$(dirname "$0") -if command -v mono >/dev/null 2>&1 && [ "$(grep -c .NETCoreApp,Version= ${ENGINEDIR}/bin/OpenRA.Server.dll)" = "0" ]; then +if command -v mono >/dev/null 2>&1 && [ "$(grep -c .NETCoreApp,Version= "${ENGINEDIR}/bin/OpenRA.Server.dll")" = "0" ]; then RUNTIME_LAUNCHER="mono --debug" else RUNTIME_LAUNCHER="dotnet" @@ -35,7 +35,7 @@ JoinChatDelay="${JoinChatDelay:-"5000"}" SupportDir="${SupportDir:-""}" while true; do - ${RUNTIME_LAUNCHER} ${ENGINEDIR}/bin/OpenRA.Server.dll Engine.EngineDir=".." Game.Mod="$Mod" \ + ${RUNTIME_LAUNCHER} "${ENGINEDIR}/bin/OpenRA.Server.dll" Engine.EngineDir=".." Game.Mod="$Mod" \ Server.Name="$Name" \ Server.ListenPort="$ListenPort" \ Server.AdvertiseOnline="$AdvertiseOnline" \ diff --git a/launch-game.sh b/launch-game.sh index a66e014a28..084b912a17 100755 --- a/launch-game.sh +++ b/launch-game.sh @@ -1,15 +1,15 @@ #!/bin/sh ENGINEDIR=$(dirname "$0") -if command -v mono >/dev/null 2>&1 && [ "$(grep -c .NETCoreApp,Version= ${ENGINEDIR}/bin/OpenRA.dll)" = "0" ]; then +if command -v mono >/dev/null 2>&1 && [ "$(grep -c .NETCoreApp,Version= "${ENGINEDIR}/bin/OpenRA.dll")" = "0" ]; then RUNTIME_LAUNCHER="mono --debug" else RUNTIME_LAUNCHER="dotnet" fi if command -v python3 >/dev/null 2>&1; then - LAUNCHPATH=$(python3 -c "import os; print(os.path.realpath('$0'))") + LAUNCHPATH=$(python3 -c 'import os,sys; print(os.path.realpath(sys.argv[1]))' "$0") else - LAUNCHPATH=$(python -c "import os; print(os.path.realpath('$0'))") + LAUNCHPATH=$(python -c 'import os,sys; print(os.path.realpath(sys.argv[1]))' "$0") fi # Prompt for a mod to launch if one is not already specified @@ -32,7 +32,7 @@ then fi # Launch the engine with the appropriate arguments -${RUNTIME_LAUNCHER} ${ENGINEDIR}/bin/OpenRA.dll Engine.EngineDir=".." Engine.LaunchPath="${LAUNCHPATH}" ${MODARG} "$@" +${RUNTIME_LAUNCHER} "${ENGINEDIR}/bin/OpenRA.dll" Engine.EngineDir=".." Engine.LaunchPath="${LAUNCHPATH}" ${MODARG} "$@" # Show a crash dialog if something went wrong if [ $? != 0 ] && [ $? != 1 ]; then diff --git a/utility.sh b/utility.sh index 22c94a029d..6c1886cb21 100755 --- a/utility.sh +++ b/utility.sh @@ -1,9 +1,9 @@ #!/bin/sh ENGINEDIR=$(dirname "$0") -if command -v mono >/dev/null 2>&1 && [ "$(grep -c .NETCoreApp,Version= ${ENGINEDIR}/bin/OpenRA.Utility.dll)" = "0" ]; then +if command -v mono >/dev/null 2>&1 && [ "$(grep -c .NETCoreApp,Version= "${ENGINEDIR}/bin/OpenRA.Utility.dll")" = "0" ]; then RUNTIME_LAUNCHER="mono --debug" else RUNTIME_LAUNCHER="dotnet" fi -ENGINE_DIR=.. ${RUNTIME_LAUNCHER} ${ENGINEDIR}/bin/OpenRA.Utility.dll "$@" +ENGINE_DIR=.. ${RUNTIME_LAUNCHER} "${ENGINEDIR}/bin/OpenRA.Utility.dll" "$@"