diff options
| author | Cody Northrop <cnorthrop@google.com> | 2016-12-02 09:10:20 -0700 |
|---|---|---|
| committer | Cody Northrop <cnorthrop@google.com> | 2016-12-02 11:33:24 -0700 |
| commit | 7269ee133553e81a823de49b0bdad5b866a45c9a (patch) | |
| tree | 6a129e679094723ba0973a1f475786eacf63624f | |
| parent | fc3e6888f3397d6c2a102746ed87933cbde40ee4 (diff) | |
| download | usermoji-7269ee133553e81a823de49b0bdad5b866a45c9a.tar.xz | |
toolchain: Fix update script for macOS
readlink -f is not supported on macOS
brew is already a requirement to build for macOS
| -rwxr-xr-x | update_external_sources.sh | 8 |
1 files changed, 7 insertions, 1 deletions
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") |
