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}"