Eliminate readlink entirely and do the same thing on all platforms

This commit is contained in:
Jim Barlow
2014-09-25 13:47:35 -07:00
parent d250fbb3d6
commit 3f8a2d8d3e
+2 -7
View File
@@ -3,15 +3,10 @@
# 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
# Determine real path of this script, following symlinks if present
BASEPATH="$(dirname $(python -c "import os; print os.path.realpath(\"$0\")"))"
# Import required scripts
BASEPATH="$(dirname $(readlink -f $0))"
. "$BASEPATH/src/config.sh"
# Set variables corresponding to the input parameters