Преглед изворни кода

Don't add external repos before uninstall

bryan пре 3 година
родитељ
комит
85ab3712d2
1 измењених фајлова са 11 додато и 11 уклоњено
  1. 11 11
      installJRMC

+ 11 - 11
installJRMC

@@ -1468,17 +1468,6 @@ main() {
         firewall_cmd(){ sudo firewall-cmd "$@"; }
     fi
 
-    # Some distros need external repos installed for MC libraries
-    if [[ "$ID" == "ubuntu" ]]; then
-        if ! grep ^deb /etc/apt/sources.list|grep -q universe; then
-            echo "Adding universe repository"
-            sudo add-apt-repository universe
-        fi 
-    elif [[ "$ID" == "centos" ]]; then
-        echo "Adding EPEL repository"
-        installPackage epel-release
-    fi
-
     parseInput "$@"
 
     # Select MC version to work with
@@ -1510,6 +1499,17 @@ main() {
         exit $?
     fi
 
+    # Some distros need external repos installed for MC libraries
+    if [[ "$ID" == "ubuntu" ]]; then
+        if ! grep ^deb /etc/apt/sources.list|grep -q universe; then
+            echo "Adding universe repository"
+            sudo add-apt-repository universe
+        fi 
+    elif [[ "$ID" == "centos" ]]; then
+        echo "Adding EPEL repository"
+        installPackage epel-release
+    fi
+
     if (( REPO_INSTALL_SWITCH )); then
         if [[ "$ID" == "suse" ]]; then
             echo "A SUSE repository is not yet available"