BourneID 7 lat temu
rodzic
commit
964daef084
1 zmienionych plików z 6 dodań i 9 usunięć
  1. 6 9
      lgsm/functions/check_deps.sh

+ 6 - 9
lgsm/functions/check_deps.sh

@@ -102,8 +102,8 @@ fn_install_universe_repo(){
         sleep 0.5
         sudo -v > /dev/null 2>&1
         if [ $? -eq 0 ]; then
-            fn_print_info_nl "Automatically adding Mono repository."
-            fn_script_log_info "Automatically adding Mono repository."
+            fn_print_info_nl "Automatically adding Universe repository."
+            fn_script_log_info "Automatically adding Universe repository."
             echo -en ".\r"
             sleep 1
             echo -en "..\r"
@@ -145,16 +145,13 @@ fn_deps_detector(){
 		depstatus=0
 		deptocheck="${javaversion}"
 		unset javacheck
-	elif [ "${deptocheck}" == "jq" ]; then
-	    if [ "${distroversion}" == "6" ]; then
+	elif [ "${deptocheck}" == "jq" ]&&[ "${distroversion}" == "6" ]; then
 		    jqstatus=1
-	    elsif [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "18.04" ]; then
+    elif [ "${deptocheck}" == "jq" ]&&[ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "18.04" ]&& ! grep -qE "^deb .*universe" /etc/apt/sources.list; then
+	        depstatus=1
+            jquniversemissing=1
 	        #1985 ubuntu 18.04.1 bug does not set sources.list correctly which means universe is not active by default
 	        #check if the universe exists and active
-	        if ! grep -qE "^deb .*universe" /etc/apt/sources.list; then
-	            jquniversemissing=1
-	        fi
-	    end
 	elif [ "${deptocheck}" == "mono-complete" ]; then
 		if [ "$(command -v mono 2>/dev/null)" ]&&[ "$(mono --version 2>&1 | grep -Po '(?<=version )\d')" -ge 5 ]; then
 			# Mono >= 5.0.0 already installed