[BUILD] make-distribution should find JAVA_HOME for non-RHEL systems
## What changes were proposed in this pull request? make-distribution.sh should find JAVA_HOME for Ubuntu, Mac and other non-RHEL systems ## How was this patch tested? Manually Author: Felix Cheung <felixcheung_m@hotmail.com> Closes #16363 from felixcheung/buildjava.
This commit is contained in:
parent
afe36516e4
commit
e1b43dc45b
|
@ -102,6 +102,13 @@ if [ -z "$JAVA_HOME" ]; then
|
|||
echo "No JAVA_HOME set, proceeding with '$JAVA_HOME' learned from rpm"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
if [ `command -v java` ]; then
|
||||
# If java is in /usr/bin/java, we want /usr
|
||||
JAVA_HOME="$(dirname $(dirname $(which java)))"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
|
|
Loading…
Reference in a new issue