Skip to content
Permalink
Browse files

Follow 302 Redirects with curl.

  • Loading branch information...
kenmazaika committed Apr 10, 2012
1 parent 7141f54 commit 241b7cc0b0c47314851821d98d217ff3f9090664
Showing with 1 addition and 1 deletion.
  1. +1 −1 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.

0 comments on commit 241b7cc

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.