]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps: fix installing gcc on ubuntu when no old compiler 22488/head
authorTomasz Setkowski <tom@ai-traders.com>
Sat, 14 Apr 2018 15:23:58 +0000 (15:23 +0000)
committerTomasz Setkowski <tom@ai-traders.com>
Sat, 9 Jun 2018 15:55:06 +0000 (15:55 +0000)
Signed-off-by: Tomasz Setkowski <tom@ai-traders.com>
install-deps.sh

index fc5dc089e792cd8979dcdaf331ab8fd0876837fc..8882724347d352b908f304006e8b98917c6dd75b 100755 (executable)
@@ -67,9 +67,11 @@ EOF
         --install /usr/bin/gcc gcc /usr/bin/gcc-${new} 20 \
         --slave   /usr/bin/g++ g++ /usr/bin/g++-${new}
 
-    $SUDO update-alternatives \
-        --install /usr/bin/gcc gcc /usr/bin/gcc-${old} 10 \
-        --slave   /usr/bin/g++ g++ /usr/bin/g++-${old}
+    if [ -f /usr/bin/g++-${old} ]; then
+      $SUDO update-alternatives \
+        --install /usr/bin/gcc gcc /usr/bin/gcc-${old} 10 \
+        --slave   /usr/bin/g++ g++ /usr/bin/g++-${old}
+    fi
 
     $SUDO update-alternatives --auto gcc