From fb8ff9af61290e15b980ba732fa5364d65edfab5 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 23 May 2024 15:20:25 +0200 Subject: [PATCH] comments --- cd.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cd.sh b/cd.sh index 3466b53..f1b7806 100644 --- a/cd.sh +++ b/cd.sh @@ -38,7 +38,7 @@ cd_main () { cd_set_environment_variables () { cd_step "Set environment variables" - # operating system + # set operating system id CD_OS_ID="$(cd_grep_os ID)" case "${CD_OS_ID}" in "almalinux") CD_OS_ID="${CD_OS_ALMA}" ;; @@ -50,6 +50,7 @@ cd_set_environment_variables () { "ubuntu") CD_OS_ID="${CD_OS_UBUNTU}" ;; *) cd_error_os "CD_OS_ID" ;; esac + # set operating system version case "${CD_OS_ID}" in "${CD_OS_ALMA}"|"${CD_OS_ARCH}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}") CD_OS_VERSION=$(cd_grep_os VERSION_ID \ @@ -63,6 +64,7 @@ cd_set_environment_variables () { CD_OS_VERSION="$(cd_grep_os VERSION_CODENAME)" ;; esac + # check operating system version case "${CD_OS_ID}" in "${CD_OS_ALMA}"|"${CD_OS_ROCKY}") case "${CD_OS_VERSION}" in @@ -108,7 +110,7 @@ cd_set_environment_variables () { CD_PKG_GIT="git" cd_split cd_echo "CD_DNS_FILE" "CD_PKG_CA" "CD_PKG_GIT" - # shared + # set ca command & root case "${CD_OS_ID}" in "${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}") CD_CA_ROOT="/etc/pki/ca-trust/source/anchors" @@ -129,7 +131,7 @@ cd_set_environment_variables () { esac cd_split cd_echo "CD_CA_ROOT" "CD_CMD_CA" - # common + # set package manager case "${CD_OS_ID}" in "${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}") CD_PM="${CD_PM_DNF}" @@ -253,7 +255,7 @@ Dir::Etc::SourceParts \"\"; esac cd_split cd_echo "CD_URL_DEFAULT" "CD_URL_CHOSEN" - # python + # set python command & package case "${CD_OS_ID}" in "${CD_OS_ALMA}"|"${CD_OS_ROCKY}") CD_PYTHON_COMMAND="python3.11" @@ -286,6 +288,7 @@ Dir::Etc::SourceParts \"\"; CD_PYTHON_PACKAGE="python3" ;; esac + # set python packages case "${CD_OS_ID}" in "${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}") CD_PYTHON_PACKAGES="/usr/lib64/${CD_PYTHON_COMMAND}/site-packages"