pkg/clean

This commit is contained in:
Marc Beninca 2024-09-08 19:23:59 +02:00
parent cfe3766056
commit 1ea1aff7bb
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -993,17 +993,6 @@ ${name}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET}
# │ f │ pm │ # │ f │ pm │
# ╰───┴────╯ # ╰───┴────╯
spcd_f_pm_clean() {
case "${SPCD_PM}" in
"${SPCD_PM_APK}") spcd_run apk cache purge ;;
"${SPCD_PM_APT}") spcd_run apt-get clean ;;
"${SPCD_PM_DNF}") spcd_run dnf clean all ;;
"${SPCD_PM_PACMAN}") spcd_run pacman --sync --clean --noconfirm ;;
"${SPCD_PM_ZYPPER}") spcd_run zypper clean ;;
*) ;;
esac
}
spcd_f_pm_install() { spcd_f_pm_install() {
case "${SPCD_PM}" in case "${SPCD_PM}" in
"${SPCD_PM_APK}") spcd_run apk add "${1}" ;; "${SPCD_PM_APK}") spcd_run apk add "${1}" ;;
@ -1013,7 +1002,7 @@ spcd_f_pm_install() {
"${SPCD_PM_ZYPPER}") spcd_run zypper --non-interactive install "${1}" ;; "${SPCD_PM_ZYPPER}") spcd_run zypper --non-interactive install "${1}" ;;
*) ;; *) ;;
esac esac
spcd_f_pm_clean spcd_f_pm_pkg_clean
} }
spcd_f_pm_query() { spcd_f_pm_query() {
@ -1104,6 +1093,21 @@ spcd_f_pm_https_verify() {
fi fi
} }
# ╭───┬────┬─────╮
# │ f │ pm │ pkg │
# ╰───┴────┴─────╯
spcd_f_pm_pkg_clean() {
case "${SPCD_PM}" in
"${SPCD_PM_APK}") spcd_run apk cache purge ;;
"${SPCD_PM_APT}") spcd_run apt-get clean ;;
"${SPCD_PM_DNF}") spcd_run dnf clean all ;;
"${SPCD_PM_PACMAN}") spcd_run pacman --sync --clean --noconfirm ;;
"${SPCD_PM_ZYPPER}") spcd_run zypper clean ;;
*) ;;
esac
}
# ╭───┬─────╮ # ╭───┬─────╮
# │ s │ dns │ # │ s │ dns │
# ╰───┴─────╯ # ╰───┴─────╯