From e745890b3305127b3be539b4aafdf3db8bd2b533 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 2 May 2024 09:39:17 +0200 Subject: [PATCH] shrink --- cd.sh | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/cd.sh b/cd.sh index 981908d..8aa2714 100644 --- a/cd.sh +++ b/cd.sh @@ -53,10 +53,10 @@ cd_set_environment () { CD_PYTHON_PACKAGE="python3.11" CD_PYTHON_PACKAGES="/usr/lib64/python3.11/site-packages" ;; - *) cd_error_os "CD_OS_VERSION" ;; + *) cd_error_os "CD_OS_VERSION=${CD_OS_VERSION}" ;; esac ;; - *) cd_error_os "CD_OS_NAME" ;; + *) cd_error_os "CD_OS_NAME=${CD_OS_NAME}" ;; esac # ci / github if [ "${GITHUB_ACTIONS}" ] ; then @@ -131,7 +131,6 @@ deb https://deb.debian.org/debian-security bookworm-security main cd_sed "${file}" "|^m|# m|" "|^# b|b|" cd_cat "${file}" ;; - *) cd_error_os "cd_set_packages_repositories" ;; esac } @@ -149,7 +148,6 @@ Dir::Etc::SourceParts \"\"; " ;; "alma") cd_mkdir "/etc/dnf/dnf.conf.d" ;; - *) cd_error_os "cd_set_packages_configuration" ;; esac } @@ -182,7 +180,6 @@ Acquire::https::Verify-Peer False; sslverify=False " ;; - *) cd_error_os "cd_set_https_verification_off" ;; esac fi } @@ -192,7 +189,6 @@ cd_update_packages_catalog () { case "${CD_OS_NAME}" in "debian") apt-get update || exit ;; "alma") dnf makecache || exit ;; - *) cd_error_os "cd_update_packages_catalog" ;; esac } @@ -201,7 +197,6 @@ cd_install_packages_tools () { case "${CD_OS_NAME}" in "debian") cd_install_package "apt-utils" ;; "alma") echo "TODO" ;; - *) cd_error_os "cd_install_packages_tools" ;; esac } @@ -215,7 +210,6 @@ cd_update_ca_certificates () { case "${CD_OS_NAME}" in "debian") update-ca-certificates || exit ;; "alma") update-ca-trust || exit ;; - *) cd_error_os "cd_update_ca" ;; esac } @@ -225,7 +219,6 @@ cd_set_https_verification_on () { case "${CD_OS_NAME}" in "debian") cd_rm "/etc/apt/apt.conf.d/https" ;; "alma") cd_rm "/etc/dnf/dnf.conf.d/https.conf" ;; - *) cd_error_os "cd_set_https_verification_on" ;; esac fi } @@ -235,7 +228,6 @@ cd_upgrade_packages () { case "${CD_OS_NAME}" in "debian") apt-get upgrade --assume-yes || exit ;; "alma") dnf upgrade --assumeyes || exit ;; - *) cd_error_os "cd_upgrade_packages" ;; esac } @@ -254,7 +246,6 @@ cd_clean_packages_cache () { case "${CD_OS_NAME}" in "debian") apt-get clean || exit ;; "alma") dnf clean all || exit ;; - *) cd_error_os "cd_clean_packages_cache" ;; esac } @@ -325,7 +316,6 @@ cd_install_package () { case "${CD_OS_NAME}" in "debian") apt-get install --assume-yes "${1}" || exit ;; "alma") dnf install --assumeyes "${1}" || exit ;; - *) exit 1 ;; esac fi }