sstephenson/ruby-build — pull request #395 by marshally (2013-08-06 23:07:22+00:00)
Title: upload all ruby-build files to s3

in response to sstephenson/ruby-build#392

This is a script that allows anyone to upload all the checksum'ed ruby-build binary files to an S3 mirror. I used the script personally to recover from the ftp.ruby-lang.org outage, but it could also be used to maintain the official mirrors.

Known problems with this release:

1. I have not attained nearly the level of bashfu as the maintainers of this project, but I'm happy to learn. I'm sure this is ghastly and needs the guts ripped out.
1. I pasted over code from ruby-build. Lots of it. I'd like to just include all of the functions available in ruby-build, but don't know how?
1. There's some cargoculting in that same cut & paste mess. Again, I'd be happy to learn a few bash tricks from my elders.
1. I used s3cmd instead of curl to push the files up to S3. Doing AWS signatures in bash made me want to put a fork in my eye. Using s3cmd made me want to bang my thumb with a hammer. Lesser of two evils chosen here.

feedback requested from @sferik who thought this might be a good idea.