aboutsummaryrefslogtreecommitdiff
path: root/dev/check-license
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 /dev/check-license
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 'dev/check-license')
-rwxr-xr-xdev/check-license22
1 files changed, 11 insertions, 11 deletions
diff --git a/dev/check-license b/dev/check-license
index 72b1013479..a006f65710 100755
--- a/dev/check-license
+++ b/dev/check-license
@@ -27,17 +27,17 @@ acquire_rat_jar () {
if [[ ! -f "$rat_jar" ]]; then
# Download rat launch jar if it hasn't been downloaded yet
if [ ! -f "$JAR" ]; then
- # Download
- printf "Attempting to fetch rat\n"
- JAR_DL="${JAR}.part"
- if hash curl 2>/dev/null; then
- curl --silent "${URL}" > "$JAR_DL" && mv "$JAR_DL" "$JAR"
- elif hash wget 2>/dev/null; then
- wget --quiet ${URL} -O "$JAR_DL" && mv "$JAR_DL" "$JAR"
- else
- printf "You do not have curl or wget installed, please install rat manually.\n"
- exit -1
- fi
+ # Download
+ printf "Attempting to fetch rat\n"
+ JAR_DL="${JAR}.part"
+ if [ $(command -v curl) ]; then
+ curl --silent "${URL}" > "$JAR_DL" && mv "$JAR_DL" "$JAR"
+ elif [ $(command -v wget) ]; then
+ wget --quiet ${URL} -O "$JAR_DL" && mv "$JAR_DL" "$JAR"
+ else
+ printf "You do not have curl or wget installed, please install rat manually.\n"
+ exit -1
+ fi
fi
unzip -tq $JAR &> /dev/null