Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #27 from kenmazaika/master
Browse files Browse the repository at this point in the history
Follow 302 Redirects with Curl
  • Loading branch information
masterkain committed Apr 10, 2012
2 parents 7141f54 + 241b7cc commit f27eabe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install_im.sh
Expand Up @@ -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.
Expand Down

0 comments on commit f27eabe

Please sign in to comment.