diff options
| author | Mike McQuaid | 2014-11-28 15:02:42 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-11-30 17:59:02 +0000 |
| commit | 6651fb886fcd7b1003aac7626005fba259988d9c (patch) | |
| tree | 97e6ad50b0b8fe734866f6fab36da901d88fc8db /Library/Homebrew/cmd/install.rb | |
| parent | 05fa09918b789251b36667986dde6f9dbf36c6af (diff) | |
| download | homebrew-6651fb886fcd7b1003aac7626005fba259988d9c.tar.bz2 | |
Allow searching/installing Homebrew Casks.
People want to install things like GIMP using Homebrew so let's make it
easier for them to find a decent installation method.
Closes #34496.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/cmd/install.rb')
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index eb93d380b..c2789a40e 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -19,7 +19,8 @@ module Homebrew msg = blacklisted? name raise "No available formula for #{name}\n#{msg}" if msg end - if not File.exist? name and name =~ HOMEBREW_TAP_FORMULA_REGEX then + if !File.exist?(name) && (name =~ HOMEBREW_TAP_FORMULA_REGEX \ + || name =~ HOMEBREW_CASK_TAP_FORMULA_REGEX) install_tap $1, $2 end end unless ARGV.force? @@ -27,6 +28,17 @@ module Homebrew begin formulae = [] + if ARGV.casks.any? + brew_cask = Formulary.factory("brew-cask") + install_formula(brew_cask) unless brew_cask.installed? + + ARGV.casks.each do |c| + cmd = "brew", "cask", "install", c + ohai cmd.join " " + system *cmd + end + end + ARGV.formulae.each do |f| # Building head-only without --HEAD is an error if not ARGV.build_head? and f.stable.nil? |
