brew fetch --force to force redownload of tarballs
External command "brew fetch" now allows -f|--force to remove an existing cached file before downloading.
This commit is contained in:
parent
07914a48ee
commit
5e7ac88265
@ -1,7 +1,13 @@
|
||||
# Downloads the tarballs for the given formulae to the Cache
|
||||
|
||||
require 'formula'
|
||||
require 'fileutils'
|
||||
|
||||
ARGV.formulae.each do |f|
|
||||
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
|
||||
|
||||
f.downloader.fetch
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user