summaryrefslogtreecommitdiff
path: root/pkg/postmkvenv.sh
diff options
context:
space:
mode:
authorKali Kaneko <kali@futeisha.org>2014-09-02 18:16:56 -0500
committerKali Kaneko <kali@leap.se>2014-09-02 18:17:53 -0500
commitb3a7454bdfa512663b4f79884e421ee990f74428 (patch)
treed8b73790d7cb20b5bfeb39ff5e072fdad3648cad /pkg/postmkvenv.sh
parent15026db807efb12eb31325cacba20230ff1936b3 (diff)
parent1d0c1c4701c0fd2c18bbbb6910de44bd0a5f4bba (diff)
Merge remote-tracking branch 'bwgpro/fix_mac_system_path' into develop
Diffstat (limited to 'pkg/postmkvenv.sh')
-rwxr-xr-xpkg/postmkvenv.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/postmkvenv.sh b/pkg/postmkvenv.sh
index 04f8d372..7b06fa6d 100755
--- a/pkg/postmkvenv.sh
+++ b/pkg/postmkvenv.sh
@@ -27,7 +27,13 @@ LIB_VIRTUALENV_PATH=$(python -c "$GET_PYTHON_LIB_CMD")
if [[ $platform == 'linux' ]]; then
LIB_SYSTEM_PATH=$(${VAR[-1]} -c "$GET_PYTHON_LIB_CMD")
elif [[ $platform == 'darwin' ]]; then
- LIB_SYSTEM_PATH=$(/opt/local/bin/python2.6 -c "$GET_PYTHON_LIB_CMD")
+ ORIGINAL_PATH=$PATH
+ #change first colon of path to | because path substitution is greedy
+ PATH=${PATH/:/|}
+ #remove everything up to | from path
+ PATH=${PATH/*|/}
+ LIB_SYSTEM_PATH=$(python -c "$GET_PYTHON_LIB_CMD")
+ PATH=$ORIGINAL_PATH
else
echo "unsupported platform; not doing symlinks"
fi