From 2eec8bef6185ed9e568988bfd0bfe2e0afd4e19f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 26 Apr 2024 16:53:41 +0200 Subject: [PATCH] clean --- cd.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cd.sh b/cd.sh index 2f580c8..c5350b6 100644 --- a/cd.sh +++ b/cd.sh @@ -155,6 +155,14 @@ function cd_upgrade_packages { esac } +function cd_clean_packages_cache { + cd_step "${FUNCNAME}" + case "${CD_OS_NAME}" in + 'debian') apt-get clean || exit ;; + *) exit 1 ;; + esac +} + function cd_main { cd_set_dns_resolving cd_set_packages_repositories @@ -167,6 +175,7 @@ function cd_main { cd_upgrade_packages cd_install_git cd_install_python + cd_clean_packages_cache DIRECTORY="$(mktemp --directory)" \ || exit @@ -176,9 +185,6 @@ git clone \ "${DIRECTORY}" \ || exit -cd_step "clean package cache" -apt-get clean \ -|| exit cd_step "bootstrap" "${DIRECTORY}/bootstrap.sh"