diff options
author | Igor Pashev <igor.pashev@nexenta.com> | 2012-09-24 15:10:36 +0400 |
---|---|---|
committer | Igor Pashev <igor.pashev@nexenta.com> | 2012-09-24 15:10:36 +0400 |
commit | 608b9ae4289d27c4ac3eb53c8cc1b9dca2a944c1 (patch) | |
tree | 8e81551c18c85cee816315c5b597e39197f461e6 | |
parent | 66890fd48bba612044f1104f5376e58016e9168e (diff) | |
download | cibs-608b9ae4289d27c4ac3eb53c8cc1b9dca2a944c1.tar.gz |
Bailout on error, follow redirects if curl
-rwxr-xr-x | scripts/download-archive | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/download-archive b/scripts/download-archive index e8cce16..a32d052 100755 --- a/scripts/download-archive +++ b/scripts/download-archive @@ -16,10 +16,10 @@ wget=`type -p wget || true` curl=`type -p curl || true` if [ -n "$wget" ]; then - $wget -c -O "$archive" "$url" || rm -f "$archive" + $wget -O "$archive" "$url" || ( rm -f "$archive"; fatal "download failed" ) elif [ -n "$curl" ]; then - $curl "$url" > "$archive" || rm -f "$archive" + $curl -L -v "$url" > "$archive" || ( rm -f "$archive"; fatal "download failed" ) else - fatal "Don't know howto download" + fatal "Don't know how to download" fi |