move scons helper to fileutils

This commit is contained in:
Adam Vandenberg 2014-02-28 07:20:52 -08:00
parent 26c71b19f6
commit 88565ac3d4
2 changed files with 8 additions and 8 deletions

View File

@ -82,6 +82,14 @@ module FileUtils extend self
end end
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 def rake *args
system RUBY_BIN/'rake', *args system RUBY_BIN/'rake', *args
end end

View File

@ -148,14 +148,6 @@ def curl *args
safe_system curl, *args safe_system curl, *args
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 puts_columns items, star_items=[] def puts_columns items, star_items=[]
return if items.empty? return if items.empty?