From 48bfd8a5856057f165c83ba9c7b07ceb28b1be72 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Fri, 28 May 2010 17:23:12 -0700 Subject: [PATCH] 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. --- bin/brew | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/brew b/bin/brew index e9974b16ab..764958032e 100755 --- a/bin/brew +++ b/bin/brew @@ -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