Daniel Gibbs 6 år sedan
förälder
incheckning
9e811a7ba0

+ 1 - 1
lgsm/functions/command_validate.sh

@@ -15,7 +15,7 @@ fn_validation(){
 	echo -e "* https://docs.linuxgsm.com/commands/validate"
 	fn_script_log_info "Validating files: SteamCMD"
 	sleep 3
-	if [ "${steamcmddir}" ]; then
+	if [ -d "${steamcmddir}" ]; then
 		cd "${steamcmddir}" || exit
 	fi
 	# Detects if unbuffer command is available for 32 bit distributions only.

+ 1 - 1
lgsm/functions/install_server_files.sh

@@ -74,7 +74,7 @@ fn_install_server_files_steamcmd(){
 	counter="0"
 	while [ "${counter}" == "0" ]||[ "${exitcode}" != "0" ]; do
 		counter=$((counter+1))
-    if [ "${steamcmddir}" ]; then
+    if [ -d "${steamcmddir}" ]; then
   		cd "${steamcmddir}" || exit
   	fi
 		if [ "${counter}" -le "10" ]; then

+ 2 - 2
lgsm/functions/update_steamcmd.sh

@@ -16,7 +16,7 @@ fn_update_steamcmd_dl(){
 	if [ "$(command -v stdbuf)" ]&&[ "${arch}" != "x86_64" ]; then
 		unbuffer="stdbuf -i0 -o0 -e0"
 	fi
-	if [ "${steamcmddir}" ]; then
+	if [ -d "${steamcmddir}" ]; then
 		cd "${steamcmddir}" || exit
 	fi
 	if [ "${appid}" == "90" ]; then
@@ -51,7 +51,7 @@ fn_update_steamcmd_localbuild(){
 
 fn_update_steamcmd_remotebuild(){
 	# Gets remote build info.
-	if [ "${steamcmddir}" ]; then
+	if [ -d "${steamcmddir}" ]; then
 		cd "${steamcmddir}" || exit
 	fi
 	remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed '1,/branches/d' | sed "1,/${branchname}/d" | grep -m 1 buildid | tr -cd '[:digit:]')