Skip to content

Commit

Permalink
Fixed the issue with mac's readlink.
Browse files Browse the repository at this point in the history
  • Loading branch information
slopjong committed Oct 16, 2011
1 parent 645cd13 commit 123d3d6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion bin/erwiz
Expand Up @@ -43,8 +43,19 @@ fi
# http://stackoverflow.com/questions/760110/can-i-get-the-absolute-path-to-the-current-script-in-korn-shell
# http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac

case "$(uname)" in
Linux)
READLINK="readlink"
;;
Darwin)
READLINK="greadlink"
;;
*)
READLINK="readlink"
esac

#COMMAND_PATH=${PWD}/`dirname $0`
COMMAND_PATH=`readlink -f $0`
COMMAND_PATH=`${READLINK} -f $0`
COMMAND_PATH=`dirname $COMMAND_PATH`

OUT_FILE=${@:$(($#)):1}
Expand Down

0 comments on commit 123d3d6

Please sign in to comment.