diff options
| author | Max Howell | 2010-11-14 03:52:59 +0000 |
|---|---|---|
| committer | Adam Vandenberg | 2011-03-12 11:55:02 -0800 |
| commit | 719e6c8999928f45dfca2d640cd6f9a3e784e9a1 (patch) | |
| tree | 7326f00409608fcb06b57467fa6f2c451593c0d0 /Library/Homebrew/cmd/install.rb | |
| parent | cf295690995c579e80c2dfdd1e2fc091c6431f26 (diff) | |
| download | brew-719e6c8999928f45dfca2d640cd6f9a3e784e9a1.tar.bz2 | |
Refactor the blacklists
Also don't abort searches if the query matches a blacklist. Eg.
`brew search vim` should return macvim and the information that vim itself is
not packaged.
Diffstat (limited to 'Library/Homebrew/cmd/install.rb')
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 43 |
1 files changed, 4 insertions, 39 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 2c48085da..2102d2182 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -1,10 +1,12 @@ require 'formula_installer' require 'hardware' +require 'blacklist' module Homebrew extend self def install - blacklisted? ARGV.named do |msg, name| - abort msg + ARGV.named.each do |name| + msg = blacklisted? name + raise "No available formula for #{name}\n#{msg}" if msg end unless ARGV.force? install_formulae ARGV.formulae @@ -62,41 +64,4 @@ module Homebrew extend self end end end - - def blacklisted? names - names.each do |name| - msg = blacklisted_reason name - yield msg.undent, name if msg - end - end - - def blacklisted_reason name - case name - when 'tex', 'tex-live', 'texlive' then <<-EOS - Installing TeX from source is weird and gross, requires a lot of patches, - and only builds 32-bit (and thus can't use Homebrew deps on Snow Leopard.) - - We recommend using a MacTeX distribution: - http://www.tug.org/mactex/ - EOS - when 'mercurial', 'hg' then <<-EOS - Mercurial can be install thusly: - brew install pip && pip install mercurial - EOS - when 'npm' then abort <<-EOS.undent - npm can be installed thusly by following the instructions at - http://npmjs.org/ - - To do it in one line, use this command: - curl http://npmjs.org/install.sh | sudo sh - EOS - when 'setuptools' then abort <<-EOS.undent - When working with a Homebrew-built Python, distribute is preferred - over setuptools, and can be used as the prerequisite for pip. - - Install distribute using: - brew install distribute - EOS - end - end end |
