From: scipio Date: Tue, 9 Jan 2007 20:49:25 +0000 (+0000) Subject: Incorporate fix for Gentoo from Daniel Goertzen. X-Git-Tag: tinyos/2.0.1~238 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=1918a9daed93b96aa539a7de52816b97e1cd415f;p=tinyos-2.x.git Incorporate fix for Gentoo from Daniel Goertzen. --- diff --git a/tools/tinyos/misc/tos-locate-jre b/tools/tinyos/misc/tos-locate-jre index b114d2c7..55908ed9 100755 --- a/tools/tinyos/misc/tos-locate-jre +++ b/tools/tinyos/misc/tos-locate-jre @@ -50,9 +50,13 @@ case `uname` in ;; Linux) + # Check gentoo java configuration + javapath=`java-config -c 2>/dev/null` # We check the path first, on the assumption that that's the preferred # version. - pathlocate javac || { test -z "$javac" && pathlocate java; } + if [ -z "$javapath" ]; then + pathlocate javac || { test -z "$javac" && pathlocate java; } + fi if [ -z "$javapath" ]; then # We try a bunch of standard names, before resorting to rpm -qa rpmlocate IBMJava2-SDK javac || \