Skip to content
Snippets Groups Projects
Commit 34147549 authored by GuoQiang Li's avatar GuoQiang Li Committed by Patrick Wendell
Browse files

[SPARK-5474][Build]curl should support URL redirection in build/mvn

Author: GuoQiang Li <witgo@qq.com>

Closes #4263 from witgo/SPARK-5474 and squashes the following commits:

ef397ff [GuoQiang Li] review commits
a398324 [GuoQiang Li] curl should support URL redirection in build/mvn
parent 4d74f060
No related branches found
No related tags found
No related merge requests found
......@@ -34,14 +34,14 @@ install_app() {
local binary="${_DIR}/$3"
# setup `curl` and `wget` silent options if we're running on Jenkins
local curl_opts=""
local curl_opts="-L"
local wget_opts=""
if [ -n "$AMPLAB_JENKINS" ]; then
curl_opts="-s"
wget_opts="--quiet"
curl_opts="-s ${curl_opts}"
wget_opts="--quiet ${wget_opts}"
else
curl_opts="--progress-bar"
wget_opts="--progress=bar:force"
curl_opts="--progress-bar ${curl_opts}"
wget_opts="--progress=bar:force ${wget_opts}"
fi
if [ -z "$3" -o ! -f "$binary" ]; then
......
......@@ -31,7 +31,7 @@ acquire_rat_jar () {
printf "Attempting to fetch rat\n"
JAR_DL="${JAR}.part"
if [ $(command -v curl) ]; then
curl --silent "${URL}" > "$JAR_DL" && mv "$JAR_DL" "$JAR"
curl -L --silent "${URL}" > "$JAR_DL" && mv "$JAR_DL" "$JAR"
elif [ $(command -v wget) ]; then
wget --quiet ${URL} -O "$JAR_DL" && mv "$JAR_DL" "$JAR"
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment