From 81612cb359baac0b476731aff4eb78e04050f857 Mon Sep 17 00:00:00 2001 From: Michael Allen Date: Tue, 25 Aug 2015 17:27:56 +0100 Subject: Follow symlinks when loading libs --- fetch.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'fetch.sh') diff --git a/fetch.sh b/fetch.sh index c06bbad..37601e3 100755 --- a/fetch.sh +++ b/fetch.sh @@ -1,6 +1,13 @@ #! /usr/bin/env bash -dot="$(cd "$(dirname "$0")"; pwd)" +if [[ "$OSTYPE" == *darwin* ]]; then + READLINK_CMD='greadlink' +else + READLINK_CMD='readlink' +fi + +dot="$(cd "$(dirname "$([ -L "$0" ] && $READLINK_CMD -f "$0" || echo "$0")")"; pwd)" + source $dot/radar-base.sh fetch; -- cgit v1.2.3