This commit is contained in:
deathbybandaid 2024-05-01 20:45:31 -04:00
parent 65aed2c1aa
commit be4ec35556

View File

@ -57,13 +57,13 @@ pkgmgr_update(){
PKG_MANAGER=$( get_pkg_mgr )
# Run apt update for distros that use apt
if [ "$PKG_MANAGER" =~ "apt" ] ; then
if [ "$PKG_MANAGER" == *"apt"* ] ; then
if should_apt_last_update ; then
"${PKG_MANAGER} update"
fi
fi
if [ "$PKG_MANAGER" =~ "apt" ] ; then
if [ "$PKG_MANAGER" == *"apt"* ] ; then
"$PKG_MANAGER" full-upgrade -y
elif [ "$PKG_MANAGER" == "dnf" ] ; then
"$PKG_MANAGER" update
@ -109,7 +109,7 @@ pkgmgr_clean(){
printf "$COL_YELLOW" "Cleaning cache for $PKG_MANAGER"
if [ "$PKG_MANAGER" =~ "apt" ] ; then
if [ "$PKG_MANAGER" == *"apt"* ] ; then
"$PKG_MANAGER" clean
"$PKG_MANAGER" autoclean
"$PKG_MANAGER" autoremove -y
@ -137,7 +137,7 @@ install_pkg() {
PKG_MANAGER=$( get_pkg_mgr )
# Run apt update for distros that use apt
if [ "$PKG_MANAGER" =~ "apt" ] ; then
if [ "$PKG_MANAGER" == *"apt"* ] ; then
if should_apt_last_update ; then
"${PKG_MANAGER} update"
fi