4
0
Эх сурвалжийг харах

removed 'unbuffer' completely and replaced it with stdbuf

Marco 'DaMaxx' Bühring 10 жил өмнө
parent
commit
44bbcf6917

+ 1 - 3
lgsm/functions/command_validate.sh

@@ -22,9 +22,7 @@ fn_validation(){
 
 	cd "${rootdir}/steamcmd"
 
-        if [ $(command -v unbuffer) ]; then
-		unbuffer=unbuffer
-        elif  [ $(command -v stdbuf) ]; then
+    if  [ $(command -v stdbuf) ]; then
 		unbuffer="stdbuf -i0 -o0 -e0"
 	fi
 

+ 6 - 8
lgsm/functions/install_server_files.sh

@@ -45,26 +45,24 @@ fn_install_server_files_steamcmd(){
 			fi
 
 			# Detects if unbuffer command is available.
-			if [ $(command -v unbuffer) ]; then
-				unbuffer=unbuffer
-                        elif  [ $(command -v stdbuf) ]; then
+            if  [ $(command -v stdbuf) ]; then
 		            unbuffer="stdbuf -i0 -o0 -e0"
 			fi
 
 			if [ "${counter}" -le "4" ]; then
 				if [ "${engine}" == "goldsource" ]; then
-					./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit
+					${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit
 					local exitcode=$?
 				else
-					./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit
+					${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit
 					local exitcode=$?
 				fi
 			elif [ "${counter}" -ge "5" ]; then
 				if [ "${engine}" == "goldsource" ]; then
-					./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit
+					${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit
 					local exitcode=$?
 				else
-					./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit
+					${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit
 					local exitcode=$?
 				fi
 			fi
@@ -82,7 +80,7 @@ fn_install_server_files_steamcmd(){
 		counter="0"
 		while [ "${counter}" -le "4" ]; do
 			counter=$((counter+1))
-			./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit
+			${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit
 			local exitcode=$?
 		done
 	fi

+ 1 - 3
lgsm/functions/update_dl.sh

@@ -14,9 +14,7 @@ fn_steamcmd_dl(){
 	cd "steamcmd"
 
 	# Detects if unbuffer command is available.
-	if [ $(command -v unbuffer) ]; then
-		unbuffer=unbuffer
-        elif  [ $(command -v stdbuf) ]; then
+    if  [ $(command -v stdbuf) ]; then
 		unbuffer="stdbuf -i0 -o0 -e0"
 	fi