aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2010-05-28 17:23:12 -0700
committerAdam Vandenberg2010-06-01 20:36:31 -0700
commit48bfd8a5856057f165c83ba9c7b07ceb28b1be72 (patch)
treef8b20ce22e100a29e34814643d6f00708f1a7a02
parent43c8bec720454636e2085f42bba220facc3e38f2 (diff)
downloadbrew-48bfd8a5856057f165c83ba9c7b07ceb28b1be72.tar.bz2
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.
-rwxr-xr-xbin/brew6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/brew b/bin/brew
index e9974b16a..764958032 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