External: 'brew fetch' downloads tarballs to cache.

This commit is contained in:
Adam Vandenberg 2010-06-15 12:35:55 -07:00
parent 8af39f115c
commit 6fd0a120f1
2 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,7 @@
# Downloads the tarballs for the given formulae to the Cache
require 'formula'
ARGV.formulae.each do |f|
f.downloader.fetch
end

View File

@ -70,6 +70,8 @@ end
class Formula
include FileUtils
attr_reader :url, :version, :homepage, :name, :specs, :downloader
# Homebrew determines the name
def initialize name='__UNKNOWN__'
set_instance_variable 'url'
@ -119,8 +121,6 @@ class Formula
@downloader.cached_location
end
attr_reader :url, :version, :homepage, :name, :specs
def bin; prefix+'bin' end
def sbin; prefix+'sbin' end
def doc; prefix+'share/doc'+name end