pm/clean
This commit is contained in:
parent
6112868374
commit
b03dd41137
1 changed files with 13 additions and 3 deletions
|
@ -715,8 +715,7 @@ Acquire::https::Verify-Peer False;
|
|||
*) ;;
|
||||
esac
|
||||
spcd_split
|
||||
spcd_os_printenv "SPCD_PM_CLEAN" \
|
||||
"SPCD_PM_INSTALL" "SPCD_PM_QUERY"
|
||||
spcd_os_printenv "SPCD_PM_INSTALL" "SPCD_PM_QUERY"
|
||||
spcd_split
|
||||
spcd_os_printenv "SPCD_PKG_PKG" "SPCD_PM_CONF_PATH" "SPCD_PM_HTTPS_PATH"
|
||||
# specific
|
||||
|
@ -875,11 +874,22 @@ spcd_environment_list_workspace() {
|
|||
# │ steps │ functions │
|
||||
# ╰───────┴───────────╯
|
||||
|
||||
spcd_clean_cache() {
|
||||
case "${SPCD_PM}" in
|
||||
"${SPCD_PM_APK}") apk cache purge ;;
|
||||
"${SPCD_PM_APT}") apt-get clean ;;
|
||||
"${SPCD_PM_DNF}") dnf clean all ;;
|
||||
"${SPCD_PM_PACMAN}") pacman --sync --clean --noconfirm ;;
|
||||
"${SPCD_PM_ZYPPER}") zypper clean ;;
|
||||
*) ;;
|
||||
esac
|
||||
}
|
||||
|
||||
spcd_install_package() {
|
||||
spcd_install_package__name="${1}"
|
||||
if [ -n "${spcd_install_package__name}" ]; then
|
||||
${SPCD_PM_INSTALL} "${spcd_install_package__name}"
|
||||
${SPCD_PM_CLEAN}
|
||||
spcd_clean_cache
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue