From 1ea1aff7bb9984e3883669597e440df18bfc9c73 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 8 Sep 2024 19:23:59 +0200 Subject: [PATCH] pkg/clean --- spcd/bootstrap.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 0268849..d0179e9 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -993,17 +993,6 @@ ${name}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET} # │ 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() { case "${SPCD_PM}" in "${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}" ;; *) ;; esac - spcd_f_pm_clean + spcd_f_pm_pkg_clean } spcd_f_pm_query() { @@ -1104,6 +1093,21 @@ spcd_f_pm_https_verify() { 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 │ # ╰───┴─────╯