diff options
author | Luis Rascao <[email protected]> | 2017-02-06 21:32:46 +0000 |
---|---|---|
committer | Luis Rascao <[email protected]> | 2017-03-12 01:15:22 +0000 |
commit | 1792f61606aac21f4cfeae2d018f776cc3f8c143 (patch) | |
tree | 552fced6e3b0cd387bc13a49ede98baddf0a27b4 /priv/templates/extended_bin | |
parent | 87faa210dd6a5589ff86a9cc6992a413022feea7 (diff) | |
download | relx-1792f61606aac21f4cfeae2d018f776cc3f8c143.tar.gz relx-1792f61606aac21f4cfeae2d018f776cc3f8c143.tar.bz2 relx-1792f61606aac21f4cfeae2d018f776cc3f8c143.zip |
Fix OSX readlink
It does not support the -f option.
Diffstat (limited to 'priv/templates/extended_bin')
-rwxr-xr-x | priv/templates/extended_bin | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin index 88d2cab..9c96b95 100755 --- a/priv/templates/extended_bin +++ b/priv/templates/extended_bin @@ -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)" |