From 0d8d0cf6f7594f4f97677a2069998331998bdfa9 Mon Sep 17 00:00:00 2001 From: Tomasz Setkowski Date: Sat, 14 Apr 2018 15:23:58 +0000 Subject: [PATCH] install-deps: fix installing gcc on ubuntu when no old compiler Signed-off-by: Tomasz Setkowski --- install-deps.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/install-deps.sh b/install-deps.sh index fc5dc089e79..8882724347d 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -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 -- 2.39.5