Author: nd-guest
Date: 2008-03-25 21:33:26 +0000 (Tue, 25 Mar 2008)
New Revision: 1443

Modified:
   packages/josm/trunk/debian/changelog
   packages/josm/trunk/debian/josm.sh
Log:
Revert from r1071 and adjust wrapper script to select a 
working java (including non-free ones).


Modified: packages/josm/trunk/debian/changelog
===================================================================
--- packages/josm/trunk/debian/changelog        2008-03-25 20:03:00 UTC (rev 
1442)
+++ packages/josm/trunk/debian/changelog        2008-03-25 21:33:26 UTC (rev 
1443)
@@ -2,8 +2,9 @@
 
   * Add 50_OsmServerWriter.dpatch to allow uploading with gcj.
   * Suppress some compiler warnings (serial, unusedImport) in build.xml.
+  * Update wrapper script to choose a working jvm. 
 
- -- Andreas Putzo <[EMAIL PROTECTED]>  Tue, 25 Mar 2008 19:49:21 +0000
+ -- Andreas Putzo <[EMAIL PROTECTED]>  Tue, 25 Mar 2008 21:29:28 +0000
 
 josm (0.0.0.20080316-1) unstable; urgency=low
 

Modified: packages/josm/trunk/debian/josm.sh
===================================================================
--- packages/josm/trunk/debian/josm.sh  2008-03-25 20:03:00 UTC (rev 1442)
+++ packages/josm/trunk/debian/josm.sh  2008-03-25 21:33:26 UTC (rev 1443)
@@ -1,14 +1,21 @@
 #!/bin/sh
 # Simple wrapper script used to start JOSM in Debian
-
 set -e
 
-if [ -z "$JAVACMD" ]; then
-    if [ -n "$JAVA_HOME" ]; then
-        JAVACMD="$JAVA_HOME/bin/java"
-    else    
-        JAVACMD="/usr/bin/java"
-    fi    
+JAVA_CMDS="$JAVA_HOME/bin/java /usr/bin/gij-4.1 /usr/bin/jamvm 
/usr/lib/jvm/java-6-sun/jre/bin/java /usr/lib/jvm/java-1.5.0-sun/jre/bin/java"
+
+for jcmd in $JAVA_CMDS; do 
+    if [ -x "$jcmd" -a -z "${JAVACMD}" ]; then
+        JAVACMD="$jcmd"
+    fi
+done
+
+if [ "$JAVACMD" ]; then
+    echo "Using $JAVACMD to execute josm.."
+    exec $JAVACMD -jar /usr/share/josm/josm.jar "$@"
+else    
+    echo "No valid JVM found to run JOSM."
+    echo "Please install one of those mentioned in README.Debian"
+    echo "or set the JAVACMD environment variable prior running josm."
+    exit 1
 fi
-
-exec $JAVACMD -jar /usr/share/josm/josm.jar "$@"


_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel

Reply via email to