arch/id,version
Some checks failed
/ job (push) Failing after 3m14s

This commit is contained in:
Marc Beninca 2024-05-05 20:27:18 +02:00
parent a384f858a1
commit 5a0687d236
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

17
cd.sh
View file

@ -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
;;