[platform] fixes IDE launch from a bin/ directory on Unix (IDEA-161265) appcode/163.4576 clion/163.4573 clion/163.4575 dbe/163.4574
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Thu, 15 Sep 2016 11:31:31 +0000 (14:31 +0300)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Thu, 15 Sep 2016 11:32:04 +0000 (14:32 +0300)
bin/scripts/unix/idea.sh

index 2bfd582f3f6249918a4bbb6ec03180cea9de9a1c..786a99486585ec0951ff14c863cb786f3dc1e39a 100755 (executable)
@@ -51,7 +51,11 @@ if [ -x "$READLINK" ]; then
 fi
 
 IDE_BIN_HOME=`dirname "$SCRIPT_LOCATION"`
-IDE_HOME=`dirname "$IDE_BIN_HOME"`
+if [ "$IDE_BIN_HOME" = "." ]; then
+  IDE_HOME=".."
+else
+  IDE_HOME=`dirname "$IDE_BIN_HOME"`
+fi
 
 # ---------------------------------------------------------------------
 # Locate a JDK installation directory which will be used to run the IDE.