Skip to content

Commit

Permalink
added silent and quiet flags to curl and wget respectively, added sin…
Browse files Browse the repository at this point in the history
…gle echo output to denote start of a download if download is needed
  • Loading branch information
Brennon York committed Dec 16, 2014
1 parent 14a5da0 commit 7e785a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build/mvn
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ install_app() {
# check if we have curl installed
# download application
[ ! -f "${local_tarball}" ] && [ -n "`which curl 2>/dev/null`" ] && \
curl "${remote_tarball}" > "${local_tarball}"
echo "exec: curl -s ${remote_tarball}" && \
curl -s "${remote_tarball}" > "${local_tarball}"
# if the file still doesn't exist, lets try `wget` and cross our fingers
[ ! -f "${local_tarball}" ] && [ -n "`which wget 2>/dev/null`" ] && \
wget -O "${local_tarball}" "${remote_tarball}"
echo "exec: wget --quiet ${remote_tarball}" && \
wget --quiet -O "${local_tarball}" "${remote_tarball}"
# if both were unsuccessful, exit
[ ! -f "${local_tarball}" ] && \
echo -n "ERROR: Cannot download $2 with cURL or wget; " && \
Expand Down

0 comments on commit 7e785a6

Please sign in to comment.