From 88565ac3d43ce4ce942070a1d4125d3a3ee2981d Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Fri, 28 Feb 2014 07:20:52 -0800 Subject: [PATCH] move scons helper to fileutils --- Library/Homebrew/extend/fileutils.rb | 8 ++++++++ Library/Homebrew/utils.rb | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Library/Homebrew/extend/fileutils.rb b/Library/Homebrew/extend/fileutils.rb index c2c36dc403..70377483a1 100644 --- a/Library/Homebrew/extend/fileutils.rb +++ b/Library/Homebrew/extend/fileutils.rb @@ -82,6 +82,14 @@ module FileUtils extend self end 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 rake *args system RUBY_BIN/'rake', *args end diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index ceee01a3c5..ee429073bf 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -148,14 +148,6 @@ 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?