[mkgmap-splitter] 02/03: Add support for OpenJDK 8 in mkgmap-splitter wrapper script.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sun Nov 1 12:17:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository mkgmap-splitter.

commit c267bfec189de129eadceca5c212de000674e17f
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Nov 1 12:27:06 2015 +0100

    Add support for OpenJDK 8 in mkgmap-splitter wrapper script.
---
 debian/changelog          |  1 +
 debian/mkgmap-splitter.sh | 31 ++++++++++++++++++++-----------
 2 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e607f6e..41dde52 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ mkgmap-splitter (0.0.0+svn427-2) UNRELEASED; urgency=medium
 
   * Update Vcs-Browser URL to use HTTPS.
   * Add upstream metadata.
+  * Add support for OpenJDK 8 in mkgmap-splitter wrapper script.
 
  -- Bas Couwenberg <sebastic at debian.org>  Tue, 01 Sep 2015 15:46:45 +0200
 
diff --git a/debian/mkgmap-splitter.sh b/debian/mkgmap-splitter.sh
index 8796cc1..b5db47c 100644
--- a/debian/mkgmap-splitter.sh
+++ b/debian/mkgmap-splitter.sh
@@ -8,23 +8,32 @@ ALTERNATIVE_JDK="`readlink -n -f /etc/alternatives/java`"
 # Let's get the current architecture -- needed for multiarchified Java
 ARCH="`dpkg --print-architecture`"
 
-JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-7-openjdk-$ARCH/bin/java /usr/bin/java"
+JAVA_CMDS="$JAVA_HOME/bin/java"
+JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-8-openjdk-$ARCH/bin/java"
+JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-7-openjdk-$ARCH/bin/java"
+JAVA_CMDS="${JAVA_CMDS} /usr/bin/java"
 
 if [ -z "$JAVA_OPTS" -o $(echo "$JAVA_OPTS" | grep "\-Xmx" | wc -l) -eq 0 ]; then
    JAVA_OPTS="$JAVA_OPTS -Xmx2000m"
 fi
 
-for jcmd in $JAVA_CMDS; do
-   if [ "z$ALTERNATIVE_JDK" = "z`readlink -n -f $jcmd`" ] && [ -z "${JAVACMD}" ]; then
-      JAVACMD="$jcmd"
-   fi
-done
+if [ -z "${JAVACMD}" ]; then
+    for jcmd in $JAVA_CMDS; do
+       if [ "z$ALTERNATIVE_JDK" = "z`readlink -n -f $jcmd`" ] && [ -z "${JAVACMD}" ]; then
+          JAVACMD="$jcmd"
+          break
+       fi
+    done
+fi
 
-for jcmd in $JAVA_CMDS; do
-   if [ -x "$jcmd" -a -z "${JAVACMD}" ]; then
-      JAVACMD="$jcmd"
-   fi
-done
+if [ -z "${JAVACMD}" ]; then
+    for jcmd in $JAVA_CMDS; do
+       if [ -x "$jcmd" -a -z "${JAVACMD}" ]; then
+          JAVACMD="$jcmd"
+          break
+       fi
+    done
+fi
 
 if [ "$JAVACMD" ]; then
    echo "Using $JAVACMD to execute mkgmap-splitter."

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mkgmap-splitter.git



More information about the Pkg-grass-devel mailing list