aboutsummaryrefslogtreecommitdiff
path: root/build/sbt-launch-lib.bash
diff options
context:
space:
mode:
authorKousuke Saruta <sarutak@oss.nttdata.co.jp>2015-01-28 12:43:22 -0800
committerPatrick Wendell <patrick@databricks.com>2015-01-28 12:43:22 -0800
commite902dc443dcc20f904e628b79b430b456cb330e4 (patch)
treeec2b29e7ead246a8886ed8eef676dd10f787b556 /build/sbt-launch-lib.bash
parent406f6d3070441962222f6a25449ea2c48f52ce88 (diff)
downloadspark-e902dc443dcc20f904e628b79b430b456cb330e4.tar.gz
spark-e902dc443dcc20f904e628b79b430b456cb330e4.tar.bz2
spark-e902dc443dcc20f904e628b79b430b456cb330e4.zip
[SPARK-5188][BUILD] make-distribution.sh should support curl, not only wget to get Tachyon
When we use `make-distribution.sh` with `--with-tachyon` option, Tachyon will be downloaded by `wget` command but some systems don't have `wget` by default (MacOS X doesn't have). Other scripts like build/mvn, build/sbt support not only `wget` but also `curl` so `make-distribution.sh` should support `curl` too. Author: Kousuke Saruta <sarutak@oss.nttdata.co.jp> Closes #3988 from sarutak/SPARK-5188 and squashes the following commits: 0f546e0 [Kousuke Saruta] Merge branch 'master' of git://git.apache.org/spark into SPARK-5188 010e884 [Kousuke Saruta] Merge branch 'SPARK-5188' of github.com:sarutak/spark into SPARK-5188 163687e [Kousuke Saruta] Fixed a merge conflict e24e01b [Kousuke Saruta] Merge branch 'master' of git://git.apache.org/spark into SPARK-5188 3daf1f1 [Kousuke Saruta] Merge branch 'master' of git://git.apache.org/spark into SPARK-5188 3caa4cb [Kousuke Saruta] Merge branch 'master' of git://git.apache.org/spark into SPARK-5188 7cc8255 [Kousuke Saruta] Fix to use \$MVN instead of mvn a3e908b [Kousuke Saruta] Fixed style 2db9fbf [Kousuke Saruta] Removed redirection from the logic which checks the existence of commands 1e4c7e0 [Kousuke Saruta] Used "command" command instead of "type" command 83b49b5 [Kousuke Saruta] Modified make-distribution.sh so that we use curl, not only wget to get tachyon
Diffstat (limited to 'build/sbt-launch-lib.bash')
-rwxr-xr-xbuild/sbt-launch-lib.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/build/sbt-launch-lib.bash b/build/sbt-launch-lib.bash
index f5df439eff..5e0c640fa5 100755
--- a/build/sbt-launch-lib.bash
+++ b/build/sbt-launch-lib.bash
@@ -50,9 +50,9 @@ acquire_sbt_jar () {
# Download
printf "Attempting to fetch sbt\n"
JAR_DL="${JAR}.part"
- if hash curl 2>/dev/null; then
+ if [ $(command -v curl) ]; then
(curl --silent ${URL1} > "${JAR_DL}" || curl --silent ${URL2} > "${JAR_DL}") && mv "${JAR_DL}" "${JAR}"
- elif hash wget 2>/dev/null; then
+ elif [ $(command -v wget) ]; then
(wget --quiet ${URL1} -O "${JAR_DL}" || wget --quiet ${URL2} -O "${JAR_DL}") && mv "${JAR_DL}" "${JAR}"
else
printf "You do not have curl or wget installed, please install sbt manually from http://www.scala-sbt.org/\n"