aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kuehl2010-02-27 18:50:25 +0100
committerAdam Vandenberg2010-03-03 09:25:56 -0800
commit5fc319236f9d9571e320158d7a18848d83583dec (patch)
tree64728249d6530c4f02e610eabd9a903a4c48921b
parent3555a3c18f7850f2e7a219598f2c5b4e84628480 (diff)
downloadbrew-5fc319236f9d9571e320158d7a18848d83583dec.tar.bz2
Add support for `brew --prefix [formula ...]`.
When `brew --prefix` is called with arguments, assume each argument is a formula and print their prefixes instead. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rwxr-xr-xbin/brew7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/brew b/bin/brew
index bd848a9f1..d5d9791eb 100755
--- a/bin/brew
+++ b/bin/brew
@@ -81,7 +81,12 @@ begin
case arg = ARGV.shift
when '--prefix'
- puts HOMEBREW_PREFIX
+ if ARGV.named.empty?
+ puts HOMEBREW_PREFIX
+ else
+ puts *ARGV.formulae.collect {|f| f.prefix}
+ end
+
when '--repository'
puts HOMEBREW_REPOSITORY
when '--cellar'