Merge pull request #1209 from MHBauer/integration-script-squash

try to use gnu version of readlink if available
This commit is contained in:
Alexandre Beslic 2015-09-11 15:57:34 -07:00
commit 7481e1de73
1 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,11 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
# try to use gnu version of readlink on non-gnu systems (e.g. bsd, osx)
# on osx, install with 'brew install coreutils'
READLINK_LOCATION=$(which greadlink readlink | head -n 1)
THIS_SCRIPT=$(${READLINK_LOCATION} -f "$BASH_SOURCE")
cd "$(dirname "${THIS_SCRIPT}")"
# Root directory of Swarm.
SWARM_ROOT=$(cd ../..; pwd -P)