parent
a384f858a1
commit
5a0687d236
1 changed files with 12 additions and 5 deletions
17
cd.sh
17
cd.sh
|
@ -43,16 +43,14 @@ cd_set_environment_variables () {
|
|||
case "${CD_OS_ID}" in
|
||||
"almalinux") CD_OS_ID="${CD_OS_ALMA}" ;;
|
||||
"alpine") CD_OS_ID="${CD_OS_ALPINE}" ;;
|
||||
"arch") CD_OS_ID="${CD_OS_ARCH}" ;;
|
||||
"debian") CD_OS_ID="${CD_OS_DEBIAN}" ;;
|
||||
"rocky") CD_OS_ID="${CD_OS_ROCKY}" ;;
|
||||
"ubuntu") CD_OS_ID="${CD_OS_UBUNTU}" ;;
|
||||
*) cd_error_os "CD_OS_ID" ;;
|
||||
esac
|
||||
case "${CD_OS_ID}" in
|
||||
"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}")
|
||||
CD_OS_VERSION="$(cd_grep_os VERSION_CODENAME)"
|
||||
;;
|
||||
"${CD_OS_ALMA}"|"${CD_OS_ROCKY}")
|
||||
"${CD_OS_ALMA}"|"${CD_OS_ARCH}"|"${CD_OS_ROCKY}")
|
||||
CD_OS_VERSION=$(cd_grep_os VERSION_ID \
|
||||
| sed "s|^\([0-9]\+\)\..*|\1|")
|
||||
;;
|
||||
|
@ -60,6 +58,9 @@ cd_set_environment_variables () {
|
|||
CD_OS_VERSION=$(cd_grep_os VERSION_ID \
|
||||
| sed "s|^\([0-9]\+\.[0-9]\+\)\..*|\1|")
|
||||
;;
|
||||
"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}")
|
||||
CD_OS_VERSION="$(cd_grep_os VERSION_CODENAME)"
|
||||
;;
|
||||
esac
|
||||
case "${CD_OS_ID}" in
|
||||
"${CD_OS_ALMA}"|"${CD_OS_ROCKY}")
|
||||
|
@ -74,6 +75,12 @@ cd_set_environment_variables () {
|
|||
*) cd_error_os "CD_OS_VERSION" ;;
|
||||
esac
|
||||
;;
|
||||
"${CD_OS_ARCH}")
|
||||
case "${CD_OS_VERSION}" in
|
||||
"20231112"|"20240101") ;;
|
||||
*) cd_error_os "CD_OS_VERSION" ;;
|
||||
esac
|
||||
;;
|
||||
"${CD_OS_DEBIAN}")
|
||||
case "${CD_OS_VERSION}" in
|
||||
"bookworm"|"bullseye") ;;
|
||||
|
@ -82,7 +89,7 @@ cd_set_environment_variables () {
|
|||
;;
|
||||
"${CD_OS_UBUNTU}")
|
||||
case "${CD_OS_VERSION}" in
|
||||
"noble"|"mantic") ;;
|
||||
"mantic"|"noble") ;;
|
||||
*) cd_error_os "CD_OS_VERSION" ;;
|
||||
esac
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue