From 82e2249bbfc6c072cca870729342d732f8e010c0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 2 May 2024 10:33:34 +0200 Subject: [PATCH] cd_error_os --- cd.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cd.sh b/cd.sh index ca22d36..4ef96ea 100644 --- a/cd.sh +++ b/cd.sh @@ -47,7 +47,7 @@ local variable "debian") case "${CD_OS_VERSION}" in "bookworm"|"bullseye") cd_nop ;; - *) cd_error_os "CD_OS_VERSION=${CD_OS_VERSION}" ;; + *) cd_error_os "CD_OS_VERSION" ;; esac CD_PYTHON_PACKAGE="python3" CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages" @@ -59,11 +59,11 @@ local variable CD_PYTHON_PACKAGE="python3.11" CD_PYTHON_PACKAGES="/usr/lib64/python3.11/site-packages" ;; - *) cd_error_os "CD_OS_VERSION=${CD_OS_VERSION}" ;; + *) cd_error_os "CD_OS_VERSION" ;; esac CD_CA_ROOT="/etc/pki/ca-trust/source/anchors" ;; - *) cd_error_os "CD_OS_NAME=${CD_OS_NAME}" ;; + *) cd_error_os "CD_OS_NAME" ;; esac # ci / github if [ "${GITHUB_ACTIONS}" ] ; then @@ -317,8 +317,11 @@ cd_error_ci () { echo "× CI: ${1}" exit 1 } + cd_error_os () { - echo "× OS: ${1}" +local variable="${1}" + echo -n "× OS: " + cd_echo "${variable}" exit 2 }