From 108b305c322ca52067fd30aa5daee4112c7cbc25 Mon Sep 17 00:00:00 2001 From: Oleg Shpynov Date: Tue, 26 Jan 2010 13:44:02 +0300 Subject: [PATCH] Propagate RUBY-5703 fix --- python/build/pycharm.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/python/build/pycharm.sh b/python/build/pycharm.sh index 1e4284e42361..3523731d94f9 100644 --- a/python/build/pycharm.sh +++ b/python/build/pycharm.sh @@ -21,9 +21,15 @@ fi # Ensure the PYCHARM_HOME var for this script points to the # home directory where PyCharm is installed on your system. -PYCHARM_HOME=`dirname "$0"`/.. -PYCHARM_BIN_HOME=`dirname "$0"` - +SCRIPT_LOCATION=$0 +# Step through symlinks to find where the script really is +while [ -L $SCRIPT_LOCATION ]; do + SCRIPT_LOCATION=`readlink -e $SCRIPT_LOCATION` +done + +PYCHARM_HOME=`dirname $SCRIPT_LOCATION`/.. +PYCHARM_BIN_HOME=`dirname $SCRIPT_LOCATION` + export JAVA_HOME export PYCHARM_HOME