Skip to content

Commit

Permalink
Supports HTTP/HTTPS redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
liancheng committed Jul 22, 2015
1 parent c03299a commit a7cbfb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/sbt-launch-lib.bash
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ acquire_sbt_jar () {
printf "Attempting to fetch sbt\n"
JAR_DL="${JAR}.part"
if [ $(command -v curl) ]; then
(curl --silent ${URL1} > "${JAR_DL}" || curl --silent ${URL2} > "${JAR_DL}") && mv "${JAR_DL}" "${JAR}"
(curl --location --silent ${URL1} > "${JAR_DL}" ||\
curl --location --silent ${URL2} > "${JAR_DL}") &&\
mv "${JAR_DL}" "${JAR}"
elif [ $(command -v wget) ]; then
(wget --quiet ${URL1} -O "${JAR_DL}" || wget --quiet ${URL2} -O "${JAR_DL}") && mv "${JAR_DL}" "${JAR}"
else
Expand Down

0 comments on commit a7cbfb3

Please sign in to comment.