diff options
| author | Adam Vandenberg | 2010-06-15 12:35:55 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-06-15 12:38:04 -0700 |
| commit | b5255849a83cb038478ef3a0ac02e158e5b3ee22 (patch) | |
| tree | 2801413478030f806d1fa650716b573f0773bc54 /Library | |
| parent | e736a3d5b8e06478e98f2d97ce8e1847539844cf (diff) | |
| download | homebrew-b5255849a83cb038478ef3a0ac02e158e5b3ee22.tar.bz2 | |
External: 'brew fetch' downloads tarballs to cache.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/examples/brew-fetch.rb | 7 | ||||
| -rw-r--r-- | Library/Homebrew/formula.rb | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/Library/Contributions/examples/brew-fetch.rb b/Library/Contributions/examples/brew-fetch.rb new file mode 100755 index 000000000..73e1f6a87 --- /dev/null +++ b/Library/Contributions/examples/brew-fetch.rb @@ -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 diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index d31c1fa7a..5353c65d4 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -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 |
