From faf17ad62f46d04223f2749dcf4dcc2a04c03911 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 3 May 2024 21:18:20 +0200 Subject: [PATCH] upgrade --- cd.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cd.sh b/cd.sh index 60e620a..60f3343 100644 --- a/cd.sh +++ b/cd.sh @@ -66,6 +66,7 @@ cd_set_environment_variables () { esac CD_CA_ROOT="/etc/pki/ca-trust/source/anchors" CD_CMD_CLEAN="dnf clean all" + CD_CMD_UPGRADE="dnf upgrade --assumeyes" CD_PYTHON_COMMAND="python3.11" CD_PYTHON_PACKAGE="python3.11" CD_PYTHON_PACKAGES="/usr/lib64/python3.11/site-packages" @@ -79,6 +80,7 @@ cd_set_environment_variables () { esac CD_CA_ROOT="/usr/local/share/ca-certificates" CD_CMD_CLEAN="apt-get clean" + CD_CMD_UPGRADE="apt-get upgrade --assume-yes" CD_PYTHON_COMMAND="python3" CD_PYTHON_PACKAGE="python3" CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages" @@ -250,16 +252,13 @@ cd_set_https_verification_on () { fi } +# agnostic steps + cd_upgrade_packages () { cd_step "Upgrade packages" - case "${CD_OS_ID}" in - "${CD_OS_ALMA}") dnf upgrade --assumeyes || exit ;; - "${CD_OS_DEBIAN}") apt-get upgrade --assume-yes || exit ;; - esac + ${CD_CMD_UPGRADE} || exit } -# agnostic steps - cd_install_git () { cd_step "Install Git" cd_install_package "${CD_GIT_PACKAGE}"