SVN: "move everything in the directory" refactoring to work: first move, then delete
[fedora-idea.git] / bin / nix / idea.sh
blobf81b8298b51ba6c0fd539f7c342c890e7b48131a
1 #!/bin/sh
3 # ------------------------------------------------------
4 # IntelliJ IDEA Startup Script for Unix
5 # ------------------------------------------------------
8 # ---------------------------------------------------------------------
9 # Before you run IntelliJ IDEA specify the location of the
10 # JDK 1.6 installation directory which will be used for running IDEA
11 # ---------------------------------------------------------------------
12 if [ -z "$IDEA_JDK" ]; then
13 IDEA_JDK=$JDK_HOME
14 if [ -z "$IDEA_JDK" ]; then
15 echo ERROR: cannot start IntelliJ IDEA.
16 echo No JDK found to run IDEA. Please validate either IDEA_JDK or JDK_HOME points to valid JDK installation
20 #--------------------------------------------------------------------------
21 # Ensure the IDEA_HOME var for this script points to the
22 # home directory where IntelliJ IDEA is installed on your system.
24 SCRIPT_LOCATION=$0
25 # Step through symlinks to find where the script really is
26 while [ -L "$SCRIPT_LOCATION" ]; do
27 SCRIPT_LOCATION=`readlink -e "$SCRIPT_LOCATION"`
28 done
30 IDEA_HOME=`dirname "$SCRIPT_LOCATION"`/..
31 IDEA_BIN_HOME=`dirname "$SCRIPT_LOCATION"`
33 export JAVA_HOME
34 export IDEA_HOME
36 if [ -n "$IDEA_PROPERTIES" ]; then
37 IDEA_PROPERTIES_PROPERTY=-Didea.properties.file=$IDEA_PROPERTIES
40 if [ -z "$IDEA_MAIN_CLASS_NAME" ]; then
41 IDEA_MAIN_CLASS_NAME="com.intellij.idea.Main"
44 if [ -z "$IDEA_VM_OPTIONS" ]; then
45 IDEA_VM_OPTIONS="$IDEA_HOME/bin/idea.vmoptions"
48 REQUIRED_JVM_ARGS="-Xbootclasspath/a:../lib/boot.jar $IDEA_PROPERTIES_PROPERTY $REQUIRED_JVM_ARGS"
49 JVM_ARGS=`tr '\n' ' ' < "$IDEA_VM_OPTIONS"`
50 JVM_ARGS="$JVM_ARGS $REQUIRED_JVM_ARGS"
52 CLASSPATH=../lib/bootstrap.jar
53 CLASSPATH=$CLASSPATH:../lib/util.jar
54 CLASSPATH=$CLASSPATH:../lib/jdom.jar
55 CLASSPATH=$CLASSPATH:../lib/log4j.jar
56 CLASSPATH=$CLASSPATH:../lib/extensions.jar
57 CLASSPATH=$CLASSPATH:../lib/trove4j.jar
58 CLASSPATH=$CLASSPATH:$IDEA_JDK/lib/tools.jar
59 CLASSPATH=$CLASSPATH:$IDEA_CLASSPATH
61 export CLASSPATH
63 LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
64 export LD_LIBRARY_PATH
66 cd "$IDEA_BIN_HOME"
67 exec $IDEA_JDK/bin/java $JVM_ARGS $IDEA_MAIN_CLASS_NAME $*