summaryrefslogtreecommitdiffstats
path: root/fetch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'fetch.sh')
-rwxr-xr-xfetch.sh9
1 files changed, 8 insertions, 1 deletions
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;