From 241b7cc0b0c47314851821d98d217ff3f9090664 Mon Sep 17 00:00:00 2001 From: Ken Mazaika Date: Tue, 10 Apr 2012 18:52:43 -0400 Subject: [PATCH] Follow 302 Redirects with curl. --- install_im.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_im.sh b/install_im.sh index c6aea23..fb28608 100755 --- a/install_im.sh +++ b/install_im.sh @@ -31,7 +31,7 @@ function try_download () { file_name=`echo "$1" | ruby -ruri -e 'puts File.basename(gets.to_s.chomp)'` # I cheated. rm -f $file_name # Cleanup in case of retry. echo "Downloading $1" - curl --fail --progress-bar -O --url $1 + curl --fail --progress-bar -O -L --url $1 result=$? # Store the code of the last action, should be 0 for a successfull download. file_size=`ls -l "$file_name" | awk '{print $5}'` # We check for normal errors, otherwise check the file size.