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

sebastic pushed a commit to branch master
in repository mkgmapgui.

commit 7cc1507d026e410d50cfbe33593555848bac44e1
Author: Bas Couwenberg <sebas...@xs4all.nl>
Date:   Sun Nov 1 13:27:29 2015 +0100

    Add support for OpenJDK 8 in mkgmapgui wrapper script.
---
 debian/changelog    |  1 +
 debian/mkgmapgui.sh | 38 +++++++++++++++++++++++++-------------
 2 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 91f139e..71f19e1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 mkgmapgui (1.1.ds-5) UNRELEASED; urgency=medium
 
   * Update Vcs-Browser URL to use HTTPS.
+  * Add support for OpenJDK 8 in mkgmapgui wrapper script.
 
  -- Bas Couwenberg <sebas...@debian.org>  Tue, 01 Sep 2015 15:47:59 +0200
 
diff --git a/debian/mkgmapgui.sh b/debian/mkgmapgui.sh
index b592020..3db2f9d 100755
--- a/debian/mkgmapgui.sh
+++ b/debian/mkgmapgui.sh
@@ -11,24 +11,36 @@ ARCH="`dpkg --print-architecture`"
 
 # If OpenJDK is only available headless, do not try it
 if dpkg --get-selections 'openjdk-*-jre' | grep install$ > /dev/null ; then
-   JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-7-openjdk-$ARCH/bin/java 
/usr/lib/jvm/java-6-openjdk/bin/java /usr/lib/jvm/java-6-openjdk-$ARCH/bin/java 
/usr/lib/jvm/java-6-sun/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/lib/jvm/java-6-openjdk/bin/java 
/usr/lib/jvm/java-6-openjdk-$ARCH/bin/java /usr/lib/jvm/java-6-sun/bin/java"
 else
-   JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-6-sun/bin/java"
+   JAVA_CMDS="$JAVA_HOME/bin/java"
+   JAVA_CMDS="${JAVA_CMDS} /usr/lib/jvm/java-6-sun/bin/java"
 fi
 
-JAVA_OPTS="$JAVA_OPTS -Xmx512M"
+if [ -z "$JAVA_OPTS" -o $(echo "$JAVA_OPTS" | grep "\-Xmx" | wc -l) -eq 0 ]; 
then
+    JAVA_OPTS="$JAVA_OPTS -Xmx512M"
+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 mkgmapgui."

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

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

Reply via email to