diff --git a/images/linux/scripts/installers/gcc.sh b/images/linux/scripts/installers/gcc.sh index 914c3e1e0..b59eae7f6 100644 --- a/images/linux/scripts/installers/gcc.sh +++ b/images/linux/scripts/installers/gcc.sh @@ -4,6 +4,11 @@ ## Desc: Installs GNU C++ ################################################################################ +set -e + +# Source the helpers for use with the script +source $HELPER_SCRIPTS/os.sh + function InstallGcc { version=$1 @@ -26,10 +31,12 @@ versions=( "g++-7" "g++-8" "g++-9" - "g++-10" ) -for version in ${versions[*]} -do +if ! isUbuntu16; then + versions+=("g++-10") +fi + +for version in ${versions[*]}; do InstallGcc $version done