]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/workunits/ceph-helpers-root.sh
update ceph source to reef 18.1.2
[ceph.git] / ceph / qa / workunits / ceph-helpers-root.sh
index f4557aec4589c4255ae6c8748eb852ddc3ef5758..5b5d2b409ee565be2b4b3114f37ed88f552baa3a 100755 (executable)
@@ -28,9 +28,21 @@ function distro_version() {
 }
 
 function install() {
+    if [ $(distro_id) = "ubuntu" ]; then
+        sudo apt-get purge -y gcc
+        sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
+    fi
     for package in "$@" ; do
         install_one $package
     done
+    if [ $(distro_id) = "ubuntu" ]; then
+        sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
+        sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
+        sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 11
+        sudo update-alternatives --set cc /usr/bin/gcc
+        sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 11
+        sudo update-alternatives --set c++ /usr/bin/g++
+    fi
 }
 
 function install_one() {