From 9ab09d9e9df53065d67ac74b35fb17291b6e9030 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 14 Mar 2020 00:11:54 +0000 Subject: [PATCH] add alterative location for steamclient.so --- lgsm/functions/fix_steamcmd.sh | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index 86cdbf0c4..3f4907d15 100644 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -13,7 +13,13 @@ if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then fixname="steamclient.so" fn_fix_msg_start mkdir -pv "${HOME}/.steam/sdk32" >> "${lgsmlog}" - cp -v "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}" + if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + cp -v "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}" + elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + cp -v "${steamcmddir}/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}" + else + $?=2 + fi fn_fix_msg_end fi @@ -22,7 +28,13 @@ if [ "${shortname}" == "bt" ]; then if [ ! -L "${executabledir}/lib64/steamclient.so" ]; then fixname="steamclient.so x86_64" fn_fix_msg_start - cp -s -v "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${executabledir}/lib64/steamclient.so" >> "${lgsmlog}" + if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then + cp -v "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${executabledir}/lib64/steamclient.so" >> "${lgsmlog}" + elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then + cp -v "${steamcmddir}/linux64/steamclient.so" "${executabledir}/lib64/steamclient.so" >> "${lgsmlog}" + else + $?=2 + fi fn_fix_msg_end fi elif [ "${shortname}" == "ss3" ]; then @@ -39,13 +51,25 @@ elif [ "${shortname}" == "hw" ]; then if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then fixname="steamclient.so x86" fn_fix_msg_start - cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}" + if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + cp -v "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}" + elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}" + else + : + fi fn_fix_msg_end fi if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" ]; then fixname="steamclient.so x86_64" fn_fix_msg_start - cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}" + if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then + cp -v "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}" + elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then + cp -v "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}" + else + : + fi fn_fix_msg_end fi elif [ "${shortname}" == "tu" ]; then