diff --git a/cd.sh b/cd.sh index 251169f..d8e02dc 100644 --- a/cd.sh +++ b/cd.sh @@ -66,6 +66,32 @@ cd_set_environment_variables () { | sed "s|^\([0-9]\+\.[0-9]\+\)\..*|\1|") ;; esac + case "${CD_OS_ID}" in + "${CD_OS_ALMA}"|"${CD_OS_ROCKY}") + case "${CD_OS_VERSION}" in + "8"|"9") ;; + *) cd_error_os "CD_OS_VERSION" ;; + esac + ;; + "${CD_OS_ALPINE}") + case "${CD_OS_VERSION}" in + "3.18"|"3.19") ;; + *) cd_error_os "CD_OS_VERSION" ;; + esac + ;; + "${CD_OS_DEBIAN}") + case "${CD_OS_VERSION}" in + "bookworm"|"bullseye") ;; + *) cd_error_os "CD_OS_VERSION" ;; + esac + ;; + "${CD_OS_UBUNTU}") + case "${CD_OS_VERSION}" in + "noble"|"mantic") ;; + *) cd_error_os "CD_OS_VERSION" ;; + esac + ;; + esac cd_echo "CD_OS_ID" "CD_OS_VERSION" # universal CD_DNS_FILE="/etc/resolv.conf" @@ -141,10 +167,6 @@ Dir::Etc::SourceParts \"\"; "${CD_OS_ALMA}") CD_OS_REPO="${CD_DEFAULT_REPO_ALMA}" [ "${CD_REPO_ALMA}" ] && CD_OS_REPO="${CD_REPO_ALMA}" - case "${CD_OS_VERSION}" in - "8"|"9") ;; - *) cd_error_os "CD_OS_VERSION" ;; - esac CD_PKG_PKG="" CD_PYTHON_COMMAND="python3.11" CD_PYTHON_PACKAGE="python3.11" @@ -153,10 +175,6 @@ Dir::Etc::SourceParts \"\"; "${CD_OS_ALPINE}") CD_OS_REPO="${CD_DEFAULT_REPO_ALPINE}" [ "${CD_REPO_ALPINE}" ] && CD_OS_REPO="${CD_REPO_ALPINE}" - case "${CD_OS_VERSION}" in - "3.18"|"3.19") ;; - *) cd_error_os "CD_OS_VERSION" ;; - esac CD_PKG_PKG="" CD_PYTHON_COMMAND="python3.11" CD_PYTHON_PACKAGE="python3"