From 5da05faf397d508be097cdce169fd55ed25f9ba4 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Wed, 12 Oct 2011 21:00:42 +0200 Subject: [PATCH] IDEA-75407 (recognize Mac JDK 1.7 preview release) --- python/build/pycharm.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/python/build/pycharm.sh b/python/build/pycharm.sh index 2636fedec522..5f2a38a0f481 100644 --- a/python/build/pycharm.sh +++ b/python/build/pycharm.sh @@ -23,9 +23,16 @@ if [ -z "$JDK" ]; then JAVA_BIN_PATH=`which java` if [ -n "$JAVA_BIN_PATH" ]; then if [ "$OS_TYPE" = "MAC" ]; then - JAVA_LOCATION=`readlink "$JAVA_BIN_PATH" | xargs dirname | xargs dirname | xargs dirname` - if [ -x "$JAVA_LOCATION/CurrentJDK/Home/bin/java" ]; then - JDK="$JAVA_LOCATION/CurrentJDK/Home" + if [ -h "$JAVA_BIN_PATH" ] ; then + JAVA_LOCATION=`readlink "$JAVA_BIN_PATH" | xargs dirname | xargs dirname | xargs dirname` + if [ -x "$JAVA_LOCATION/CurrentJDK/Home/bin/java" ]; then + JDK="$JAVA_LOCATION/CurrentJDK/Home" + fi + else + JAVA_LOCATION=`echo "$JAVA_BIN_PATH" | xargs dirname | xargs dirname` + if [ -f "$JAVA_LOCATION/lib/tools.jar" ]; then + JDK="$JAVA_LOCATION" + fi fi else JAVA_LOCATION=`readlink -f "$JAVA_BIN_PATH"`