From 9055c1e3617269e2d28f97addf4d56f6b57d348a Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Tue, 25 Feb 2014 07:34:45 -0800 Subject: [PATCH] add scons helper --- Library/Homebrew/utils.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index ee429073bf..ceee01a3c5 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -148,6 +148,14 @@ def curl *args safe_system curl, *args end +# Run scons using a Homebrew-installed version, instead of whatever +# is in the user's PATH +def scons *args + scons = Formulary.factory("scons").opt_prefix/'bin/scons' + raise "#{scons} is not executable" unless scons.exist? and scons.executable? + safe_system scons, *args +end + def puts_columns items, star_items=[] return if items.empty?