Class: Strapper::Recipes::Homebrew

Inherits:
Strapper::Recipe show all
Defined in:
lib/strapper/recipes/homebrew.rb

Instance Method Summary collapse

Methods inherited from Strapper::Recipe

#initialize, register_keyword

Constructor Details

This class inherits a constructor from Strapper::Recipe

Instance Method Details

#installed?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/strapper/recipes/homebrew.rb', line 7

def installed?
  `which brew` != ""
end

#runObject



11
12
13
14
15
16
17
18
# File 'lib/strapper/recipes/homebrew.rb', line 11

def run
  if installed?
    puts "Homebrew is already installed"
  else
    puts "Installing homebrew"
    `ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"`
  end
end