Skip to content

Commit 50c1dfb

Browse files
committed
fallback redhat installs to almalinux and rockylinux for or-tools install
Signed-off-by: Sombrio <sombrio@sombrasoft.dev>
1 parent ea740ab commit 50c1dfb

1 file changed

Lines changed: 22 additions & 5 deletions

File tree

etc/DependencyInstaller.sh

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,8 @@ main() {
11091109
_install_common_dev
11101110
local ubuntu_version_normalized=${ubuntu_version}
11111111
if _version_compare "${ubuntu_version_normalized}" -ge "25.04"; then
1112-
ubuntu_version_normalized="25.04"
1112+
# FIXME make do with or-tools for 24.10 until an official release for 25.04 is available
1113+
ubuntu_version_normalized="24.10"
11131114
elif _version_compare "${ubuntu_version_normalized}" -ge "24.04"; then
11141115
ubuntu_version_normalized="24.04"
11151116
elif _version_compare "${ubuntu_version_normalized}" -ge "22.04"; then
@@ -1137,12 +1138,28 @@ main() {
11371138
fi
11381139
if [[ "${option}" == "common" || "${option}" == "all" ]]; then
11391140
_install_common_dev
1141+
local os_id
1142+
os_id=$(awk -F= '/^ID/{print $2}' /etc/os-release | sed 's/"//g')
1143+
local arch
1144+
arch=$(uname -m)
1145+
local or_tools_distro=""
1146+
local or_tools_version=""
11401147
if [[ "${rhel_version}" == "8" ]]; then
1141-
_install_or_tools "AlmaLinux" "8.10" "x86_64" "${SKIP_SYSTEM_OR_TOOLS}"
1142-
fi
1143-
if [[ "${rhel_version}" == "9" ]]; then
1144-
_install_or_tools "rockylinux" "9" "amd64" "${SKIP_SYSTEM_OR_TOOLS}"
1148+
or_tools_distro="AlmaLinux"
1149+
or_tools_version="8.10"
1150+
if [[ "${os_id}" != "almalinux" ]]; then
1151+
warn "Using AlmaLinux or-tools package for RHEL 8 compatible system."
1152+
fi
1153+
elif [[ "${rhel_version}" == "9" ]]; then
1154+
or_tools_version="9"
1155+
if [[ "${os_id}" == "almalinux" || "${os_id}" == "rocky" ]]; then
1156+
or_tools_distro="${os_id^}" # Capitalize first letter
1157+
else
1158+
or_tools_distro="rockylinux"
1159+
warn "Defaulting to rockylinux or-tools package for RHEL 9 compatible system."
1160+
fi
11451161
fi
1162+
_install_or_tools "${or_tools_distro}" "${or_tools_version}" "${arch}" "${SKIP_SYSTEM_OR_TOOLS}"
11461163
fi
11471164
;;
11481165
"Darwin")

0 commit comments

Comments
 (0)