correct syntax for removing with pacman and yum

This commit is contained in:
Daniel Hansson 2023-10-04 18:27:13 +02:00 committed by GitHub
parent 6ed4d38160
commit 6da8204aab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
lib.sh
View File

@ -137,10 +137,10 @@ purge_linux_package() {
apt-get autoremove -y
elif [ "$OS" = "CentOS" ] || [ "$OS" = "RedHat" ] || [ "${UPSTREAM_ID}" = "rhel" ] || [ "${OS}" = "Almalinux" ] || [ "${UPSTREAM_ID}" = "Rocky*" ]
then
yum purge "${1}" -y
yum remove "${1}" -y
elif [ "${ID}" = "arch" ] || [ "${UPSTREAM_ID}" = "arch" ]
then
pacman -S purge "${1}"
pacman -Rs "${1}"
fi
}