Daniel Gibbs 6 лет назад
Родитель
Сommit
df9218df9a

+ 1 - 1
lgsm/functions/check_steamcmd.sh

@@ -46,7 +46,7 @@ fn_check_steamcmd_user(){
 fn_check_steamcmd(){
 	# Checks if SteamCMD exists when starting or updating a server.
 	# Only install if steamcmd package is missing or steamcmd dir is missing.
-	if [ ! -f "${steamcmddir}/steamcmd.sh" ]&&[ ! "$(command -v steamcmd 2>/dev/null)" ]; then
+	if [ ! -f "${steamcmddir}/steamcmd.sh" ]&&[ -z "$(command -v steamcmd 2>/dev/null)" ]; then
 		if [ "${function_selfname}" == "command_install.sh" ]; then
 			fn_install_steamcmd
 		else

+ 1 - 1
lgsm/functions/command_dev_detect_glibc.sh

@@ -13,7 +13,7 @@ echo -e "================================="
 echo -e "glibc Requirements Checker"
 echo -e "================================="
 
-if [ ! "$(command -v objdump)" ]; then
+if [ -z "$(command -v objdump)" ]; then
 	fn_print_failure_nl "objdump is missing"
 	fn_script_log_fatal "objdump is missing"
 	core_exit.sh

+ 1 - 1
lgsm/functions/command_fastdl.sh

@@ -23,7 +23,7 @@ luafastdlfile="lgsm_cl_force_fastdl.lua"
 luafastdlfullpath="${luasvautorundir}/${luafastdlfile}"
 
 # Check if bzip2 is installed.
-if [ ! "$(command -v bzip2 2>/dev/null)" ]; then
+if [ -z "$(command -v bzip2 2>/dev/null)" ]; then
 	fn_print_fail "bzip2 is not installed"
 	fn_script_log_fatal "bzip2 is not installed"
 	core_exit.sh

+ 1 - 1
lgsm/functions/core_dl.sh

@@ -256,7 +256,7 @@ fn_update_function(){
 }
 
 # Check that curl is installed
-if [ ! "$(command -v curl 2>/dev/null)" ]; then
+if [ -z "$(command -v curl 2>/dev/null)" ]; then
 	echo -e "[ FAIL ] Curl is not installed"
 	exit 1
 fi

+ 1 - 1
lgsm/functions/info_distro.sh

@@ -71,7 +71,7 @@ glibcversion=$(ldd --version | sed -n '1s/.* //p')
 
 ## tmux version
 # e.g: tmux 1.6
-if [ ! "$(command -V tmux 2>/dev/null)" ]; then
+if [ -z "$(command -V tmux 2>/dev/null)" ]; then
 	tmuxv="${red}NOT INSTALLED!${default}"
 else
 	if [ "$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" -lt "16" ]; then