CVS eclipse/debian/extra

Michael Koch mkoch-guest at haydn.debian.org
Sat Jan 7 19:56:13 UTC 2006


Update of /cvsroot/pkg-java/eclipse/debian/extra
In directory haydn:/tmp/cvs-serv18354/extra

Modified Files:
	eclipse.sh 
Log Message:
* debian/extra/eclipse.sh: Made the -vm option working.


--- /cvsroot/pkg-java/eclipse/debian/extra/eclipse.sh	2006/01/07 09:33:31	1.7
+++ /cvsroot/pkg-java/eclipse/debian/extra/eclipse.sh	2006/01/07 19:56:13	1.8
@@ -40,7 +40,7 @@
         exit 0
     elif [ "$1" = "-vm" ]; then
         shift
-        JAVA_HOME="$1"
+        JAVACMD="$1"
         shift
     else
         CMDLINEARGS="${CMDLINEARGS} $1"
@@ -63,7 +63,7 @@
 
 # If the user has not set JAVA_HOME, cycle through our list of compatible VM's
 # and pick the first one that exists.
-if [ -z "${JAVA_HOME}" ]; then
+if [ -z "${JAVA_HOME}" -a ! -n "${JAVACMD}" ]; then
     echo "searching for compatible vm..."
     javahomelist=`cat /etc/eclipse/java_home  | grep -v '^#' | grep -v '^$' | while read line ; do echo -n $line ; echo -n ":" ; done`
     OFS="$IFS"
@@ -82,7 +82,7 @@
 fi
 
 # If we don't have a JAVA_HOME yet, we're doomed.
-if [ -z "${JAVA_HOME}" ]; then
+if [ -z "${JAVA_HOME}" -a ! -n "${JAVACMD}" ]; then
     zenity \
         --error \
         --title="Could not launch Eclipse Platform" \
@@ -90,6 +90,11 @@
     exit 1
 fi
 
+# Set JAVACMD from JAVA_HOME
+if [ -n "${JAVA_HOME}" -a -z "${JAVACMD}" ]; then
+    JAVACMD="$JAVA_HOME/bin/java"
+fi
+
 # Set path for the Mozilla SWT binding
 if [ -d /usr/lib/firefox ]; then
     export MOZILLA_FIVE_HOME=/usr/lib/firefox
@@ -101,7 +106,7 @@
 
 # Do the actual launch of Eclipse with the selected VM.
 /usr/lib/eclipse/eclipse \
-    -vm "${JAVA_HOME}/bin/java" \
+    -vm "${JAVACMD}" \
     -install /usr/lib/eclipse ${CMDLINEARGS} \
     -vmargs -Djava.library.path=/usr/lib/jni \
             -Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.0/classmap.db \



More information about the pkg-java-commits mailing list