Add "brew --cellar (formula)"

If a formula name is passed to "brew --cellar", output the location of that
brew in the Cellar (which will be "brew --prefix (formula)" without a version
sub-folder.)

This allows for:
  rm -rf `brew --cellar node`
for deleting all versions of node, installed or not.
This commit is contained in:
Adam Vandenberg 2010-05-28 17:23:12 -07:00
parent 43c8bec720
commit 48bfd8a585

View File

@ -88,7 +88,11 @@ begin
when '--repository'
puts HOMEBREW_REPOSITORY
when '--cellar'
puts HOMEBREW_CELLAR
if ARGV.named.empty?
puts HOMEBREW_CELLAR
else
puts *ARGV.formulae.collect {|f| HOMEBREW_CELLAR+f.name}
end
when '--config'
dump_config