From 721836976c387cfff55436bd5b3734b1e06e7620 Mon Sep 17 00:00:00 2001 From: David Calavera Date: Sat, 26 Jan 2013 11:06:01 -0800 Subject: [PATCH] Install homebrew only if it's not in the path already. --- Rakefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Rakefile b/Rakefile index c1d9d03..93c18ab 100644 --- a/Rakefile +++ b/Rakefile @@ -8,7 +8,7 @@ task :install => [:submodule_init, :submodules] do puts "======================================================" puts - #install_homebrew if RUBY_PLATFORM.downcase.include?("darwin") + install_homebrew if RUBY_PLATFORM.downcase.include?("darwin") install_rvm_binstubs # this has all the runcoms from this directory. @@ -79,11 +79,15 @@ def install_rvm_binstubs end def install_homebrew - puts "======================================================" - puts "Installing Homebrew, the OSX package manager...If it's" - puts "already installed, this will do nothing." - puts "======================================================" - run %{ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"} + brew_path = run("which brew") + unless $?.success? + puts "======================================================" + puts "Installing Homebrew, the OSX package manager...If it's" + puts "already installed, this will do nothing." + puts "======================================================" + run %{ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"} + end + puts puts puts "======================================================"