-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install fails on Mac (no option -e for readlink) #38
Comments
@faceleg I don't think this fixes it. Compare the Linux Linux
Mac
See also: |
Thanks, reopening. Seeing as you have quick access to a mac (I assume), would you mind fixing this? |
I thought about it for a bit and I could not think of a clean fix, as installing Can possibly think about it / fix it later this week or next when I am not so busy. |
We could use something like: SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" From http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in |
@faceleg's code seems to work for me (OSX 10.10) |
Script above my comment |
Cool, can you make a PR with your install file? |
There is no
-e
option on thereadlink
installed on Mac OSX, so the install fails completely (see L11 oninstall
here)Refer to this commit: 32fb793
The text was updated successfully, but these errors were encountered: