From 1285515df77b436de294bd7fd5a43df787c9df9e Mon Sep 17 00:00:00 2001 From: Thomas Matthijs Date: Fri, 17 Sep 2004 00:10:42 +0000 Subject: respect JAVA_HOME, bug 61665 --- dev-java/ant-core/files/1.6.2-ant | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'dev-java/ant-core') diff --git a/dev-java/ant-core/files/1.6.2-ant b/dev-java/ant-core/files/1.6.2-ant index 645db65e6ae9..9096cb9b43a0 100644 --- a/dev-java/ant-core/files/1.6.2-ant +++ b/dev-java/ant-core/files/1.6.2-ant @@ -15,7 +15,7 @@ # limitations under the License. # Edited for Gentoo Linux -# $Header: /var/cvsroot/gentoo-x86/dev-java/ant-core/files/1.6.2-ant,v 1.1 2004/09/10 19:45:18 axxo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/ant-core/files/1.6.2-ant,v 1.2 2004/09/17 00:08:25 axxo Exp $ # Extract launch and ant arguments, (see details below). ant_exec_args= @@ -68,11 +68,14 @@ else fi fi -if [ -f $HOME/.gentoo/java-env ] ; then - source $HOME/.gentoo/java-env -else - JAVA_HOME=`java-config --jdk-home` - CLASSPATH=`java-config --classpath`:${CLASSPATH} + +if [ -z $JAVA_HOME ] ; then + if [ -f $HOME/.gentoo/java-env ] ; then + source $HOME/.gentoo/java-env + else + JAVA_HOME=`java-config --jdk-home` + CLASSPATH=`java-config --classpath`:${CLASSPATH} + fi fi if [ -z $JAVA_HOME ] ; then -- cgit v1.2.3-65-gdbad