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"