This is an automated email from the git hooks/post-receive script. ebourg-guest pushed a commit to branch master in repository java-wrappers.
commit 94069206798b9700661b35f4807b2b31049c8ab6 Author: Vincent Fourmond <[email protected]> Date: Fri Feb 29 20:42:11 2008 +0000 [java-wrappers] find_java_runtime now takes several arguments --- debian/changelog | 6 ++++++ java-wrappers.sh | 58 ++++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8ac4729..878fce2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +java-wrappers (0.1.4) UNRELEASED; urgency=low + + * Improved find_java_runtime to take several arguments + + -- Vincent Fourmond <[email protected]> Wed, 27 Feb 2008 00:42:03 +0100 + java-wrappers (0.1.3) unstable; urgency=low * Small documentation fixes diff --git a/java-wrappers.sh b/java-wrappers.sh index ed6554f..f982080 100644 --- a/java-wrappers.sh +++ b/java-wrappers.sh @@ -56,7 +56,7 @@ fi # If JAVA_CMD exists, nothing is done. If JAVA_HOME exists, only that # is searched. # -# In the other cases, the runtime is looked for according to one of the +# In the other cases, the runtime is looked for according to the # following arguments: # * 2 : java runtime 2 # * swing : a JVM that has swing @@ -64,6 +64,10 @@ fi # javax.xml.stream.util.StreamReaderDelegate # * sun: sun's JVM, for stuff depending on the infamous com.sun classes # * sun6: sun's JVM version 6 +# * icedtea: icedtea +# +# More than one argument can be specified; they will be taken into account +# in that order. # # If JAVA_DEBUGGER is set, we try to use jdb rather than java, if it is # present. @@ -124,29 +128,41 @@ find_java_runtime() { fi if [ -z "$JAVA_HOME" ]; then + # We now try to look for a reasonable JAVA_HOME. # First, narrow the choices, approximately according to what # was asked - case $1 in - # A java2 runtime - 2) DIRS=$java2_runtimes - ;; - swing) DIRS="$icedtea $sun_java"; - ;; - sun) DIRS=$sun_java - ;; - sunmax5) DIRS="$sun4 $sun5" - ;; - sunmin5) DIRS="$sun5 $sun6" - ;; - sun6) DIRS=$sun6 - ;; - fullxml) DIRS=$xml_extra - ;; - *) DIRS=$all_runtimes - ;; - esac - # And pick up the first one that works + + DIRS="" + while test "$1" + do + case $1 in + # A java2 runtime + 2) DIRS="$DIRS $java2_runtimes" + ;; + swing) DIRS="$DIRS $icedtea $sun_java"; + ;; + sun) DIRS="$DIRS $sun_java" + ;; + sunmax5) DIRS="$DIRS $sun4 $sun5" + ;; + sunmin5) DIRS="$DIRS $sun5 $sun6" + ;; + sun6) DIRS="$DIRS $sun6" + ;; + fullxml) DIRS="$DIRS $xml_extra" + ;; + icedtea) DIRS="$icedtea" + ;; + *) ;; + esac + shift + done + # Nothing means everything + if test -z "$DIRS"; then + DIRS=$all_runtimes + fi + # And pick up the first one that works reasonably for dir in $DIRS; do if [ -x $dir/bin/java ]; then JAVA_HOME=$dir -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/java-wrappers.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

