aboutsummaryrefslogtreecommitdiff
path: root/scripts/download-archive
diff options
context:
space:
mode:
authorIgor Pashev <igor.pashev@nexenta.com>2012-09-24 15:10:36 +0400
committerIgor Pashev <igor.pashev@nexenta.com>2012-09-24 15:10:36 +0400
commit608b9ae4289d27c4ac3eb53c8cc1b9dca2a944c1 (patch)
tree8e81551c18c85cee816315c5b597e39197f461e6 /scripts/download-archive
parent66890fd48bba612044f1104f5376e58016e9168e (diff)
downloadcibs-608b9ae4289d27c4ac3eb53c8cc1b9dca2a944c1.tar.gz
Bailout on error, follow redirects if curl
Diffstat (limited to 'scripts/download-archive')
-rwxr-xr-xscripts/download-archive6
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