Kaynağa Gözat

tmux will now be detected if compiled from source

#736
Daniel Gibbs 9 yıl önce
ebeveyn
işleme
ed0ddc35f4
1 değiştirilmiş dosya ile 21 ekleme ve 4 silme
  1. 21 4
      lgsm/functions/check_deps.sh

+ 21 - 4
lgsm/functions/check_deps.sh

@@ -9,7 +9,7 @@ local commandname="CHECK"
 fn_deps_detector(){
 fn_deps_detector(){
 	# Checks if dependency is missing
 	# Checks if dependency is missing
 	if [ -n "$(command -v dpkg-query)" ]; then
 	if [ -n "$(command -v dpkg-query)" ]; then
-		dpkg-query -W -f='${Status}' ${deptocheck} 2>/dev/null| grep -q -P '^install ok installed$'
+		dpkg-query -W -f='${Status}' ${deptocheck} 2>/dev/null | grep -q -P '^install ok installed$'
 		depstatus=$?
 		depstatus=$?
 	elif [ -n "$(command -v yum)" ]; then
 	elif [ -n "$(command -v yum)" ]; then
 		yum -q list installed ${deptocheck} > /dev/null 2>&1
 		yum -q list installed ${deptocheck} > /dev/null 2>&1
@@ -18,6 +18,11 @@ fn_deps_detector(){
 	if [ "${depstatus}" == "0" ]; then
 	if [ "${depstatus}" == "0" ]; then
 		missingdep=0
 		missingdep=0
 		if [ "${function_selfname}" == "command_install.sh" ]; then
 		if [ "${function_selfname}" == "command_install.sh" ]; then
+			if [ "${tmuxcheck}" != "1" ]; then
+				# Added for users compiling tmux from source to bypass rpm check
+				echo -e "${green}tmux${default}"
+				tmuxcheck=1
+			fi
 			echo -e "${green}${deptocheck}${default}"
 			echo -e "${green}${deptocheck}${default}"
 			sleep 0.5
 			sleep 0.5
 		fi
 		fi
@@ -137,7 +142,11 @@ if [ -n "$(command -v dpkg-query)" ]; then
 
 
 	# All servers except ts3 require tmux
 	# All servers except ts3 require tmux
 	if [ "${executable}" != "./ts3server_startscript.sh" ]; then
 	if [ "${executable}" != "./ts3server_startscript.sh" ]; then
-		array_deps_required+=( tmux )
+		if [ "$(command -v tmux)" ]||[ "$(which tmux)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
+			: # Added for users compiling tmux from source to bypass rpm check
+		else
+			array_deps_required+=( tmux )
+		fi
 	fi
 	fi
 
 
 	# All servers except ts3 & mumble require libstdc++6, lib32gcc1
 	# All servers except ts3 & mumble require libstdc++6, lib32gcc1
@@ -184,11 +193,19 @@ elif [ -n "$(command -v yum)" ]; then
 	array_deps_missing=()
 	array_deps_missing=()
 
 
 	# LGSM requirements
 	# LGSM requirements
-	array_deps_required=( curl util-linux python file )
+	if [ "${distroversion}" == "6" ]; then
+		array_deps_required=( curl util-linux-ng python file )
+	else
+		array_deps_required=( curl util-linux python file )
+	fi
 
 
 	# All servers except ts3 require tmux
 	# All servers except ts3 require tmux
 	if [ "${executable}" != "./ts3server_startscript.sh" ]; then
 	if [ "${executable}" != "./ts3server_startscript.sh" ]; then
-		array_deps_required+=( tmux )
+		if [ "$(command -v tmux)" ]||[ "$(which tmux)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
+			: # Added for users compiling tmux from source to bypass rpm check
+		else
+			array_deps_required+=( tmux )
+		fi
 	fi
 	fi
 
 
 	# All servers excelts ts3 & mumble require glibc.i686 libstdc++.i686
 	# All servers excelts ts3 & mumble require glibc.i686 libstdc++.i686