[DebianGIS-dev] r1725 - in packages/mkgmap/trunk/debian: . scripts
nd-guest at alioth.debian.org
nd-guest at alioth.debian.org
Mon Jul 14 14:36:05 UTC 2008
Author: nd-guest
Date: 2008-07-14 14:36:04 +0000 (Mon, 14 Jul 2008)
New Revision: 1725
Modified:
packages/mkgmap/trunk/debian/changelog
packages/mkgmap/trunk/debian/scripts/mkgmap
Log:
search for best working jvm in wrapper script
Modified: packages/mkgmap/trunk/debian/changelog
===================================================================
--- packages/mkgmap/trunk/debian/changelog 2008-07-14 13:57:16 UTC (rev 1724)
+++ packages/mkgmap/trunk/debian/changelog 2008-07-14 14:36:04 UTC (rev 1725)
@@ -1,5 +1,5 @@
-mkgmap (0.0.0+svn569-1) unstable; urgency=low
+mkgmap (0.0.0+svn630-1) unstable; urgency=low
- * Initial release (Closes: #475773)
+ * Initial release (Closes: #475773)
- -- Andreas Putzo <andreas at putzo.net> Sun, 13 Apr 2008 19:29:58 +0000
+ -- Andreas Putzo <andreas at putzo.net> Mon, 14 Jul 2008 13:38:36 +0000
Modified: packages/mkgmap/trunk/debian/scripts/mkgmap
===================================================================
--- packages/mkgmap/trunk/debian/scripts/mkgmap 2008-07-14 13:57:16 UTC (rev 1724)
+++ packages/mkgmap/trunk/debian/scripts/mkgmap 2008-07-14 14:36:04 UTC (rev 1725)
@@ -2,4 +2,22 @@
# Simple wrapper script to execute mkgmap in Debian
set -e
-exec /usr/bin/java -jar /usr/share/mkgmap/mkgmap.jar "$@"
+# First, the users preference as defined by $JAVA_HOME. Next, the
+# other JVMs known to work with mkgmap, with the one working best
+# fist, and the less functional onces after that. Last, use /usr/bin/java.
+# Override to a specific one using JAVACMD
+JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-6-openjdk/bin/java /usr/lib/jvm/java-6-sun/jre/bin/java /usr/lib/jvm/java-1.5.0-sun/jre/bin/java /usr/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 mkgmap."
+ exec $JAVACMD -jar /usr/share/mkgmap/mkgmap.jar "$@"
+else
+ echo "No valid JVM found to run mkgmap."
+ exit 1
+fi
More information about the Pkg-grass-devel
mailing list