aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/base-files/base-files_3.0.14.bbappend
blob: 4651185aa949e8a575136963f36ba9f0f7efc2b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
do_install_append() {
	cat >> ${D}${sysconfdir}/profile << EOT
JAVA_HOME=""
for dir in ${libdir}/jvm/*; do
	if [ -x "\${dir}/bin/java" ]; then
		[ -z "\${JAVA_HOME}" ] && JAVA_HOME="\${dir}"
	fi
done
if [ -n "\${JAVA_HOME}" ]; then
	export JAVA_HOME=\${JAVA_HOME}
fi
EOT
}