From 7269ee133553e81a823de49b0bdad5b866a45c9a Mon Sep 17 00:00:00 2001 From: Cody Northrop Date: Fri, 2 Dec 2016 09:10:20 -0700 Subject: toolchain: Fix update script for macOS readlink -f is not supported on macOS brew is already a requirement to build for macOS --- update_external_sources.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/update_external_sources.sh b/update_external_sources.sh index a33c8505..9db212fe 100755 --- a/update_external_sources.sh +++ b/update_external_sources.sh @@ -3,7 +3,13 @@ set -e -CURRENT_DIR="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" +if [[ $(uname) == "Linux" ]]; then + CURRENT_DIR="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" +elif [[ $(uname) == "Darwin" ]]; then + # Get greadlink with "brew install coreutils" + CURRENT_DIR="$(dirname "$(greadlink -f ${BASH_SOURCE[0]})")" +fi + REVISION_DIR="$CURRENT_DIR/external_revisions" GLSLANG_REVISION=$(cat "${REVISION_DIR}/glslang_revision") -- cgit v1.2.3