spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pwend...@apache.org
Subject git commit: Fix mvn detection
Date Mon, 23 Jun 2014 18:25:01 GMT
Repository: spark
Updated Branches:
  refs/heads/master b88238fae -> 853a2b951


Fix mvn detection

When mvn is not detected (not in executor's path), 'set -e' causes the
detection to terminate the script before the helpful error message can
be displayed.

Author: Matthew Farrellee <matt@redhat.com>

Closes #1181 from mattf/master-0 and squashes the following commits:

506549f [Matthew Farrellee] Fix mvn detection


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/853a2b95
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/853a2b95
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/853a2b95

Branch: refs/heads/master
Commit: 853a2b951d4c7f6c6c37f53b465b3c7b77691b7c
Parents: b88238f
Author: Matthew Farrellee <matt@redhat.com>
Authored: Mon Jun 23 11:24:05 2014 -0700
Committer: Patrick Wendell <pwendell@gmail.com>
Committed: Mon Jun 23 11:24:05 2014 -0700

----------------------------------------------------------------------
 make-distribution.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/853a2b95/make-distribution.sh
----------------------------------------------------------------------
diff --git a/make-distribution.sh b/make-distribution.sh
index ae52b49..6f708e0 100755
--- a/make-distribution.sh
+++ b/make-distribution.sh
@@ -89,12 +89,12 @@ if [ -z "$JAVA_HOME" ]; then
   exit -1
 fi
 
-VERSION=$(mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -v "INFO"
| tail -n 1)
-if [ $? != 0 ]; then
+if ! which mvn &>/dev/null; then
     echo -e "You need Maven installed to build Spark."
     echo -e "Download Maven from https://maven.apache.org/"
     exit -1;
 fi
+VERSION=$(mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -v "INFO"
| tail -n 1)
 
 JAVA_CMD="$JAVA_HOME"/bin/java
 JAVA_VERSION=$("$JAVA_CMD" -version 2>&1)


Mime
View raw message