Skip to content
Snippets Groups Projects
Commit d39280bd authored by Mike McQuaid's avatar Mike McQuaid
Browse files

Add current Ruby globals.

Allows access to the Ruby path. Needed for Linux
porting.
parent cac86a4f
No related branches found
No related tags found
No related merge requests found
......@@ -81,13 +81,11 @@ module FileUtils extend self
end
end
RUBY_BIN = '/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin'
def rake *args
system "#{RUBY_BIN}/rake", *args
system RUBY_BIN/'rake', *args
end
def ruby *args
system "#{RUBY_BIN}/ruby", *args
system RUBY_PATH, *args
end
end
......@@ -285,7 +285,7 @@ class FormulaInstaller
begin
read.close
exec '/usr/bin/nice',
'/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby',
RUBY_PATH,
'-W0',
'-I', Pathname.new(__FILE__).dirname,
'-rbuild',
......
......@@ -7,6 +7,7 @@ require 'extend/object'
require 'utils'
require 'exceptions'
require 'set'
require 'rbconfig'
ARGV.extend(HomebrewArgvExtension)
......@@ -63,6 +64,10 @@ end
HOMEBREW_LOGS = Pathname.new('~/Library/Logs/Homebrew/').expand_path
RUBY_CONFIG = RbConfig::CONFIG
RUBY_BIN = Pathname.new("#{RUBY_CONFIG['bindir']}")
RUBY_PATH = RUBY_BIN/RUBY_CONFIG['ruby_install_name'] + RUBY_CONFIG['EXEEXT']
if RUBY_PLATFORM =~ /darwin/
MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp
MACOS_VERSION = /(10\.\d+)(\.\d+)?/.match(MACOS_FULL_VERSION).captures.first.to_f
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment