You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by fe...@apache.org on 2016/12/22 01:24:57 UTC
spark git commit: [BUILD] make-distribution should find JAVA_HOME for
non-RHEL systems
Repository: spark
Updated Branches:
refs/heads/master afe36516e -> e1b43dc45
[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 <fe...@hotmail.com>
Closes #16363 from felixcheung/buildjava.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e1b43dc4
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e1b43dc4
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e1b43dc4
Branch: refs/heads/master
Commit: e1b43dc45b136a89f105c04c3074233f52568152
Parents: afe3651
Author: Felix Cheung <fe...@hotmail.com>
Authored: Wed Dec 21 17:24:53 2016 -0800
Committer: Felix Cheung <fe...@apache.org>
Committed: Wed Dec 21 17:24:53 2016 -0800
----------------------------------------------------------------------
dev/make-distribution.sh | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/e1b43dc4/dev/make-distribution.sh
----------------------------------------------------------------------
diff --git a/dev/make-distribution.sh b/dev/make-distribution.sh
index 6ea319e..6c5ae0d 100755
--- a/dev/make-distribution.sh
+++ b/dev/make-distribution.sh
@@ -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
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org