Scripts: Quote path variables
This commit is contained in:
committed by
Matthias Mailänder
parent
bb2ee37cc0
commit
ea02b90636
@@ -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" \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" "$@"
|
||||
|
||||
Reference in New Issue
Block a user