Skip to content

Commit

Permalink
Fix OSX readlink
Browse files Browse the repository at this point in the history
It does not support the -f option.
  • Loading branch information
lrascao committed Mar 12, 2017
1 parent 87faa21 commit 1792f61
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion priv/templates/extended_bin
Expand Up @@ -17,7 +17,16 @@ if [ "$TERM" = "dumb" -o -z "$TERM" ]; then
export TERM=screen
fi

SCRIPT=$(readlink -f $0 || true)
# OSX does not support readlink '-f' flag, work
# around that
case $OSTYPE in
darwin*)
SCRIPT=$(readlink $0 || true)
;;
*)
SCRIPT=$(readlink -f $0 || true)
;;
esac
[ -z $SCRIPT ] && SCRIPT=$0
SCRIPT_DIR="$(cd `dirname "$SCRIPT"` && pwd -P)"
RELEASE_ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd -P)"
Expand Down

0 comments on commit 1792f61

Please sign in to comment.