summaryrefslogtreecommitdiffstats
path: root/install-deps.sh
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@redhat.com>2022-08-10 22:35:01 +0200
committerCasey Bodley <cbodley@redhat.com>2022-08-11 00:07:18 +0200
commitc62970a86de18d3d705cc6a2cc488c6f1c564dc3 (patch)
treeb0c2fd4757701ae179e45516e491e0e2046e48c9 /install-deps.sh
parentinstall-deps: centos8 doesn't have or need centos-release-scl (diff)
downloadceph-c62970a86de18d3d705cc6a2cc488c6f1c564dc3.tar.xz
ceph-c62970a86de18d3d705cc6a2cc488c6f1c564dc3.zip
install-deps: update ensure_decent_gcc_on_rh for gcc-toolset
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'install-deps.sh')
-rwxr-xr-xinstall-deps.sh13
1 files changed, 5 insertions, 8 deletions
diff --git a/install-deps.sh b/install-deps.sh
index 10d8fa45219..9ca4667ce1b 100755
--- a/install-deps.sh
+++ b/install-deps.sh
@@ -234,25 +234,22 @@ function version_lt {
function ensure_decent_gcc_on_rh {
local old=$(gcc -dumpversion)
- local expected=10.2
local dts_ver=$1
- if version_lt $old $expected; then
+ if version_lt $old $dts_ver; then
if test -t 1; then
# interactive shell
cat <<EOF
Your GCC is too old. Please run following command to add DTS to your environment:
-scl enable devtoolset-8 bash
+scl enable gcc-toolset-$dts_ver bash
-Or add following line to the end of ~/.bashrc to add it permanently:
+Or add the following line to the end of ~/.bashrc and run "source ~/.bashrc" to add it permanently:
-source scl_source enable devtoolset-8
-
-see https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/ for more details.
+source scl_source enable gcc-toolset-$dts_ver
EOF
else
# non-interactive shell
- source /opt/rh/devtoolset-$dts_ver/enable
+ source /opt/rh/gcc-toolset-$dts_ver/enable
fi
fi
}