diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:11 +0000 |
commit | 3c315f0fff93aa072472abc10815963ac0035268 (patch) | |
tree | a95f6a96e0e7bd139c010f8dc60b40e5b3062a99 /packaging/installer/dependencies/ol.sh | |
parent | Adding upstream version 1.35.1. (diff) | |
download | netdata-3c315f0fff93aa072472abc10815963ac0035268.tar.xz netdata-3c315f0fff93aa072472abc10815963ac0035268.zip |
Adding upstream version 1.36.0.upstream/1.36.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/installer/dependencies/ol.sh')
-rwxr-xr-x | packaging/installer/dependencies/ol.sh | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/packaging/installer/dependencies/ol.sh b/packaging/installer/dependencies/ol.sh index 8d0feb3f5..020bf63cc 100755 --- a/packaging/installer/dependencies/ol.sh +++ b/packaging/installer/dependencies/ol.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Package tree used for installing netdata on distribution: -# << Oracle Linux: [8] >> +# << Oracle Linux: [8, 9] >> set -e @@ -90,13 +90,17 @@ check_flags() { } validate_tree_ol() { - opts= if [ "${NON_INTERACTIVE}" -eq 1 ]; then echo >&2 "Running in non-interactive mode" opts="-y" fi + # shellcheck disable=SC1091 + source /etc/os-release + + # shellcheck disable=SC2153 + version="$(echo "${VERSION}" | cut -f 1 -d '.')" echo >&2 " > Checking for config-manager ..." if ! dnf config-manager &> /dev/null; then @@ -106,9 +110,17 @@ validate_tree_ol() { fi echo " > Checking for CodeReady Builder ..." - if ! dnf repolist | grep ol8_codeready_builder; then - if prompt "CodeReadyBuilder not found, shall I install it?"; then - dnf ${opts} config-manager --set-enabled ol8_codeready_builder || enable_repo + if [[ "${version}" =~ ^8(\..*)?$ ]]; then + if ! dnf repolist enabled | grep ol8_codeready_builder; then + if prompt "CodeReadyBuilder not found, shall I install it?"; then + dnf ${opts} config-manager --set-enabled ol8_codeready_builder || enable_repo + fi + fi + elif [[ "${version}" =~ ^9(\..*)?$ ]]; then + if ! dnf repolist enabled | grep ol9_codeready_builder; then + if prompt "CodeReadyBuilder not found, shall I install it?"; then + dnf ${opts} config-manager --set-enabled ol9_codeready_builder || enable_repo + fi fi fi |