From cfd3d8868b71831b5109c95a43b729151c7ae7cb Mon Sep 17 00:00:00 2001 From: Jeroen Massar Date: Wed, 16 Mar 2016 09:02:03 +0100 Subject: Verify that the Xcode Command Line Tools are installed Otherwise /usr/include does not exist on a clean-ish install Signed-off-by: Jeroen Massar Signed-off-by: Dirk Hohndel --- scripts/build.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scripts') diff --git a/scripts/build.sh b/scripts/build.sh index ea8752119..014d2d32b 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -23,6 +23,18 @@ exec 1> >(tee build.log) 2>&1 SRC=$(pwd) PLATFORM=$(uname) +# Verify that the Xcode Command Line Tools are installed +if [ $PLATFORM = Darwin ] ; then + if [ ! -d /usr/include ] ; then + echo "Error: Xcode Command Line Tools are not installed" + echo "" + echo "Please run:" + echo " xcode-select --install" + echo "to install them (you'll have to agree to Apple's licensing terms etc), then run build.sh again" + exit 1; + fi +fi + # normally this script builds the desktop version in subsurface/build # if the first argument is "-mobile" then build Subsurface-mobile in subsurface/build-mobile # if the first argument is "-both" then build both in subsurface/build and subsurface/build-mobile -- cgit v1.2.3-70-g09d2