diff --git a/cd.sh b/cd.sh index 88d7d0c..80e9ee7 100644 --- a/cd.sh +++ b/cd.sh @@ -42,7 +42,8 @@ cd_main () { cd_set_environment_variables () { cd_step "Set environment variables" # operating system - case "$(cd_grep_os ID)" in + CD_OS_ID="$(cd_grep_os ID)" + case "${CD_OS_ID}" in "almalinux") CD_OS_ID="${CD_OS_ALMA}" CD_OS_VERSION=$(cd_grep_os VERSION_ID \ @@ -57,11 +58,15 @@ cd_set_environment_variables () { CD_OS_ID="${CD_OS_DEBIAN}" CD_OS_VERSION="$(cd_grep_os VERSION_CODENAME)" ;; + *) cd_error_os "CD_OS_ID" ;; esac # universal CD_DNS_FILE="/etc/resolv.conf" CD_PKG_CA="ca-certificates" CD_PKG_GIT="git" + # common + case "${CD_OS_ID}" in + esac # case "${CD_OS_ID}" in "${CD_OS_ALMA}") @@ -145,7 +150,6 @@ Dir::Etc::SourceParts \"\"; CD_PYTHON_PACKAGE="python3" CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages" ;; - *) cd_error_os "CD_OS_ID" ;; esac # variables [ "${CD_CA_1}" ] && CD_CA=true