From: Petteri Räty Date: Mon, 3 Mar 2008 17:20:41 +0000 (+0000) Subject: Add the ability to tell where the env file is located to set_java_env. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=249c288f6bb16df1bd824f293e92c299a2266d28;p=gentoo.git Add the ability to tell where the env file is located to set_java_env. --- diff --git a/eclass/java-vm-2.eclass b/eclass/java-vm-2.eclass index b059e1f81283..47e067ca7060 100644 --- a/eclass/java-vm-2.eclass +++ b/eclass/java-vm-2.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.19 2007/12/16 17:11:01 caster Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.20 2008/03/03 17:20:41 betelgeuse Exp $ # ----------------------------------------------------------------------------- # @eclass-begin @@ -148,10 +148,15 @@ get_system_arch() { # TODO rename to something more evident, like install_env_file set_java_env() { + debug-print-function ${FUNCNAME} $* local platform="$(get_system_arch)" local env_file="${D}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}" local old_env_file="${D}/etc/env.d/java/20${P}" - local source_env_file="${FILESDIR}/${VMHANDLE}.env" + if [[ ${1} ]]; then + local source_env_file="${1}" + else + local source_env_file="${FILESDIR}/${VMHANDLE}.env" + fi if [[ ! -f ${source_env_file} ]]; then die "Unable to find the env file: ${source_env_file}"