Don't add external repos before uninstall

This commit is contained in:
2022-01-14 01:19:04 -05:00
parent d71ec8ca44
commit 85ab3712d2

View File

@@ -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"