From 4d4d0b90c5892ad82c1ac67ca6cd2f1424b633a6 Mon Sep 17 00:00:00 2001 From: Will Thames Date: Mon, 30 Jul 2012 21:09:53 +1000 Subject: [PATCH] readlink -f does not work on OS X. Replaced with a python solution --- hacking/env-setup | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hacking/env-setup b/hacking/env-setup index e6d7a27b332..45c77c6fb7b 100755 --- a/hacking/env-setup +++ b/hacking/env-setup @@ -8,7 +8,9 @@ if [ -n "$BASH_SOURCE" ] ; then else HACKING_DIR="$PWD/hacking" fi -FULL_PATH=`readlink -fn $HACKING_DIR` +# The below is an alternative to readlink -fn which doesn't exist on OS X +# Source: http://stackoverflow.com/a/1678636 +FULL_PATH=`python -c "import os, sys; print os.path.realpath('$HACKING_DIR')"` ANSIBLE_HOME=`dirname $FULL_PATH` PREFIX_PYTHONPATH="$ANSIBLE_HOME/lib"