From 0f8a1acc920a542c3c27230e13ebd8a4799c335c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Tue, 6 Mar 2018 13:26:41 +0100 Subject: [PATCH] Fix magic starter macOS compatibility --- tfw_magic_start.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tfw_magic_start.sh b/tfw_magic_start.sh index 57524e7..7c594a7 100755 --- a/tfw_magic_start.sh +++ b/tfw_magic_start.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash set -e -TAO_PATH="${TAO_PATH:-$(dirname $(readlink -f $0))/..}" +[ "$(uname)" == "Darwin" ] && readlink_cmd="greadlink" || readlink_cmd="readlink" +SCRIPT_DIR="$(dirname $($readlink_cmd -f $0))" + +TAO_PATH="${TAO_PATH:-$SCRIPT_DIR/..}" BACKEND_REPO="${BACKEND_REPO:-tutorial-framework-wip}" FRONTEND_REPO="${FRONTEND_REPO:-tutorial-framework-ng}" BACKEND_PATH="${TAO_PATH}/${BACKEND_REPO}"