Created
August 6, 2014 12:37
-
-
Save mindjiver/b5a7d5d7fd9bff8a6cf8 to your computer and use it in GitHub Desktop.
readlink on osx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $(uname) = "Linux" ]; then | |
script=$(readlink -f $0) | |
elif [ $(uname) = "Darwin" ]; then | |
script=$(stat -f %N $0) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment