External: 'brew fetch' downloads tarballs to cache.
This commit is contained in:
parent
8af39f115c
commit
6fd0a120f1
7
Library/Contributions/examples/brew-fetch.rb
Executable file
7
Library/Contributions/examples/brew-fetch.rb
Executable 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
|
||||||
@ -70,6 +70,8 @@ end
|
|||||||
class Formula
|
class Formula
|
||||||
include FileUtils
|
include FileUtils
|
||||||
|
|
||||||
|
attr_reader :url, :version, :homepage, :name, :specs, :downloader
|
||||||
|
|
||||||
# Homebrew determines the name
|
# Homebrew determines the name
|
||||||
def initialize name='__UNKNOWN__'
|
def initialize name='__UNKNOWN__'
|
||||||
set_instance_variable 'url'
|
set_instance_variable 'url'
|
||||||
@ -119,8 +121,6 @@ class Formula
|
|||||||
@downloader.cached_location
|
@downloader.cached_location
|
||||||
end
|
end
|
||||||
|
|
||||||
attr_reader :url, :version, :homepage, :name, :specs
|
|
||||||
|
|
||||||
def bin; prefix+'bin' end
|
def bin; prefix+'bin' end
|
||||||
def sbin; prefix+'sbin' end
|
def sbin; prefix+'sbin' end
|
||||||
def doc; prefix+'share/doc'+name end
|
def doc; prefix+'share/doc'+name end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user