aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAdam Vandenberg2009-11-08 15:00:44 -0800
committerMax Howell2009-11-09 18:35:39 +0000
commit20d7ef3d45fa52035134b45ed48697e6aebca1fc (patch)
tree2811ec302214d1355dffdc7acc73cbca517bf99e /bin
parent04f3ddeac01b75c66ec8e8f83a517cc13b6d3ab9 (diff)
downloadbrew-20d7ef3d45fa52035134b45ed48697e6aebca1fc.tar.bz2
Add OS X, Ruby, compiler & hardware info to --config
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew40
1 files changed, 26 insertions, 14 deletions
diff --git a/bin/brew b/bin/brew
index 716916c76..a876c7fc3 100755
--- a/bin/brew
+++ b/bin/brew
@@ -41,23 +41,35 @@ if MACOS_VERSION < 10.5
end
def dump_config
- puts <<-EOS
-HOMEBREW_VERSION: #{HOMEBREW_VERSION}
-
-HOMEBREW_PREFIX: #{HOMEBREW_PREFIX}
-\tWhere do we symlink installs to?
-
-HOMEBREW_CELLAR: #{HOMEBREW_CELLAR}
-\tWhere do we store our built products?
-
-HOMEBREW_CACHE: #{HOMEBREW_CACHE}
-\tWhere do we cache our downloads?
+ require 'hardware'
+
+ `/usr/bin/gcc-4.2 -v 2>&1` =~ /build (\d{4,})/
+ gcc_build = $1.to_i
+
+ llvm_build = "None"
+ if MACOS_VERSION >= 10.6
+ `/Developer/usr/bin/llvm-gcc-4.2 -v 2>&1` =~ /LLVM build (\d{4,})/
+ llvm_build = $1.to_i
+ end
+
+ bits = Hardware.is_64_bit? ? 64 : 32
+ cores = Hardware.processor_count
+ puts <<-EOS
+HOMEBREW_VERSION: #{HOMEBREW_VERSION}
+HOMEBREW_PREFIX: #{HOMEBREW_PREFIX}
+HOMEBREW_CELLAR: #{HOMEBREW_CELLAR}
+HOMEBREW_CACHE: #{HOMEBREW_CACHE}
HOMEBREW_REPOSITORY: #{HOMEBREW_REPOSITORY}
-\tWhere is our .git?
-Library path: #{$:.first}
-\tWhat do we put on the ruby path?
+Library path: #{$:.first}
+
+Hardware: #{Hardware.intel_family}, #{cores} cores, #{bits} bits
+
+OS X: #{MACOS_FULL_VERSION}
+Ruby: #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}
+GCC: build #{gcc_build}
+LLVM: build #{llvm_build}
EOS
end