summaryrefslogtreecommitdiffstats
path: root/envsetup.sh
diff options
context:
space:
mode:
authorAdrian DC <radian.dc@gmail.com>2016-10-06 13:42:43 +0200
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-10-12 06:03:00 -0700
commit5bf9b09f6420bd494702ce1b7eb8d502e2d33963 (patch)
treee7f5295b72ea0317ebe13c22f30d2c35b775f3d8 /envsetup.sh
parent7b16908add24102b5c3aa36b1062075c1c67e088 (diff)
downloadbuild-5bf9b09f6420bd494702ce1b7eb8d502e2d33963.zip
build-5bf9b09f6420bd494702ce1b7eb8d502e2d33963.tar.gz
build-5bf9b09f6420bd494702ce1b7eb8d502e2d33963.tar.bz2
build: Support a fallback to java 8 if java 7 is not found
* In the case of a host installed only with java 8, the build starts correctly but on use of JAVA_HOME binaries, the java references are missing * Allow the java 7 to be tested and try to use java 8 Change-Id: Ie50892edb54feb8608a0ef80a1c2a8667703e8ee
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/envsetup.sh b/envsetup.sh
index 3efd683..3c11a22 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -2406,7 +2406,8 @@ function set_java_home() {
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
;;
esac
- else
+ fi
+ if [ ! "$JAVA_HOME" ] || [ ! -d "$JAVA_HOME" ]; then
case `uname -s` in
Darwin)
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)