All pastes #28611 Raw Edit

Something

public shellscript v1 · immutable
#28611 ·published 2005-11-13 22:23 UTC
rendered paste body
	local compiler=$(java-pkg_get-compiler_) 	local compiler_executable	if [[ "${compiler}" = "javac" ]]; then		# nothing fancy needs to be done for javac		compiler_executable="javac"	else		# for everything else, try to determine from an env file		local compiler_env="/etc/env.d/java/50${compiler}"		if [[ -f ${compiler_env} ]]; then			# try to get value of JAVAC			compiler_executable=$(source ${compiler_env} 1>/dev/null 2>&1; echo ${JAVAC})			[[ -z ${compiler_executable} ]] &&				die "JAVAC is empty or undefined in ${compiler_env}"				# check that it's executable			if [[ ! -x ${compiler_executable} ]]; then				eerror "Could not find ${compiler_executable}!"				die "${compiler_executable} doesn't exist, or isn't executable"			fi		else			eerror "Could not find environment file for ${compiler}"			die "Could not find ${compiler.env}"		fi	fi	[[ -n ${JAVA_PKG_DEBUG} ]] && 		echo ${compiler_executable} $(java-pkg_javac-args) "${@}"	${compiler_executable} $(java-pkg_javac-args) "${@}" || die "${javac} failed"