Fix call to readlink on OS X

readlink -f is a GNU coreutils extension, so not available on OS X and
other platforms.
This commit is contained in:
Jim Barlow
2014-09-25 03:11:27 -07:00
parent d510e7e4ae
commit d250fbb3d6
+7
View File
@@ -3,6 +3,13 @@
# Copyright (c) 2013-14: fritz-hh from Github (https://github.com/fritz-hh)
##############################################################################
# Darwin/OS X has not evolved a proper readlink yet
if [ $(uname) == "Darwin" ]; then
function readlink() {
python -c 'import os,sys; print os.path.realpath(sys.argv[1])' "$2"
}
fi
# Import required scripts
BASEPATH="$(dirname $(readlink -f $0))"
. "$BASEPATH/src/config.sh"