From 30140e9769dc33191fcf37e777d1fc45fe9d6e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20P=C3=B6chtrager?= Date: Sat, 6 Dec 2014 16:13:40 +0100 Subject: [PATCH] build_clang.sh: set +e before running `which` --- build_clang.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build_clang.sh b/build_clang.sh index 9137959..2e91874 100755 --- a/build_clang.sh +++ b/build_clang.sh @@ -12,6 +12,7 @@ BUILD_DIR=$BASE_DIR/build if [ -z "$SKIP_GCC_CHECK" ]; then if [ $PLATFORM != "Darwin" -a $PLATFORM != "FreeBSD" ]; then + set +e which "g++${GCC_SUFFIX}" &>/dev/null && \ { export CC="gcc${GCC_SUFFIX}" @@ -39,6 +40,7 @@ if [ $PLATFORM != "Darwin" -a $PLATFORM != "FreeBSD" ]; then echo "(i.e. GCC_SUFFIX=-4.7 $0)" 1>&2 exit 1 } + set -e fi fi @@ -66,6 +68,7 @@ require wget function warn_if_installed() { + set +e which $1 &>/dev/null && \ { echo "" @@ -73,6 +76,7 @@ function warn_if_installed() echo "-> $(which $1 2>/dev/null)" echo "" } + set -e } if [ $PLATFORM != "Darwin" -a $PLATFORM != "FreeBSD" ]; then