From 8297f9ff7c71e4e2e8c0711d8ab36f4d463981b9 Mon Sep 17 00:00:00 2001 From: Wilhelm Bierbaum Date: Fri, 29 Apr 2022 10:27:32 -0700 Subject: [PATCH] Update build script to exit if clang is not present --- scripts/linux-build.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/linux-build.sh b/scripts/linux-build.sh index 09c6383a..fdbe657f 100755 --- a/scripts/linux-build.sh +++ b/scripts/linux-build.sh @@ -1,10 +1,16 @@ #!/bin/bash -e # fetch and extract the rust toolchain + +function die() { + echo "$@" > /dev/stderr + exit 1 +} + ## ## Preconditions ## -which clang || echo "Please run this build with an LLVM toolchain present (e.g. under scl)" 1>&2 +which clang || die "Please run this build with an LLVM toolchain present (e.g. under scl)" rm -rf toolchain echo "Fetching toolchain..."