diff --git a/cd.sh b/cd.sh index 316fe0e..a0ad71d 100644 --- a/cd.sh +++ b/cd.sh @@ -122,6 +122,14 @@ function cd_set_https_verification_on { esac } +function cd_upgrade_packages { + cd_step "${FUNCNAME}" + case "${CD_OS_NAME}" in + 'debian') apt-get upgrade --yes || exit ;; + *) exit 1 ;; + esac +} + function cd_main { cd_set_dns_resolving cd_set_packages_repositories @@ -130,13 +138,8 @@ function cd_main { cd_update_packages_catalog cd_install_ca cd_set_https_verification_on - -cd_step "update package catalog" -apt-get update \ -|| exit -cd_step "upgrade packages" -apt-get upgrade --yes \ -|| exit + cd_update_packages_catalog + cd_upgrade_packages cd_step "install Git" apt-get install --yes 'git' \