2010-06-15 12:35:55 -07:00
|
|
|
# Downloads the tarballs for the given formulae to the Cache
|
|
|
|
|
|
|
|
require 'formula'
|
2010-06-15 21:52:11 -07:00
|
|
|
require 'fileutils'
|
2010-06-15 12:35:55 -07:00
|
|
|
|
|
|
|
ARGV.formulae.each do |f|
|
2010-06-15 21:52:11 -07:00
|
|
|
if ARGV.include? "--force" or ARGV.include? "-f"
|
|
|
|
where_to = `brew --cache #{f.name}`.strip
|
|
|
|
FileUtils.rm_rf where_to unless where_to.empty?
|
|
|
|
end
|
|
|
|
|
2010-07-04 10:42:44 -07:00
|
|
|
the_tarball = f.downloader.fetch
|
2010-07-07 21:31:55 -07:00
|
|
|
if the_tarball.kind_of? Pathname
|
2010-07-29 09:14:52 -07:00
|
|
|
puts "MD5: #{the_tarball.md5}"
|
|
|
|
puts "SHA1: #{the_tarball.sha1}"
|
2010-07-07 21:31:55 -07:00
|
|
|
end
|
2010-06-15 12:35:55 -07:00
|
|
|
end
|