aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend/fileutils.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2014-02-28 07:20:52 -0800
committerAdam Vandenberg2014-02-28 07:20:52 -0800
commit88565ac3d43ce4ce942070a1d4125d3a3ee2981d (patch)
tree4062559a2aa6d6b421c7b6f9e77cb7efc22d3794 /Library/Homebrew/extend/fileutils.rb
parent26c71b19f6f715e1f558da1c904aafe6eecebe11 (diff)
downloadbrew-88565ac3d43ce4ce942070a1d4125d3a3ee2981d.tar.bz2
move scons helper to fileutils
Diffstat (limited to 'Library/Homebrew/extend/fileutils.rb')
-rw-r--r--Library/Homebrew/extend/fileutils.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/fileutils.rb b/Library/Homebrew/extend/fileutils.rb
index c2c36dc40..70377483a 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