Permalink
Browse files

tweaks I needed to run on centos 5

  • Loading branch information...
1 parent b5e1c1a commit b3774455ca208dfc98ff53a1721606a0ccdef800 @jrwren committed Mar 30, 2012
Showing with 8 additions and 3 deletions.
  1. +5 −1 Library/Homebrew/formula_installer.rb
  2. +2 −1 Library/Homebrew/global.rb
  3. +1 −1 bin/brew
View
6 Library/Homebrew/formula_installer.rb
@@ -106,7 +106,11 @@ def install_private f
fork do
begin
read.close
- exec '/usr/bin/nice', '/usr/bin/ruby', '-I', File.dirname(__FILE__), '-rinstall', f.path, '--', *ARGV.options_only
+ nicecmd = '/usr/bin/nice'
+ if !File.exists?(nicecmd)
+ nicecmd = '/bin/nice'
+ end
+ exec nicecmd, '/usr/bin/env','ruby', '-I', File.dirname(__FILE__), '-rinstall', f.path, '--', *ARGV.options_only
rescue => e
Marshal.dump(e, write)
write.close
View
3 Library/Homebrew/global.rb
@@ -66,7 +66,8 @@ def assert_linux
RECOMMENDED_GCC_42 = (MACOS_VERSION >= 10.6) ? 5664 : 5577
elsif on_linux
- LINUX_ISSUE = /(.*?) \\n/.match(`cat /etc/issue`.chomp).captures.first
+ f = File.open('/etc/issue')
+ LINUX_ISSUE = f.readlines[0]
LINUX_VERSION = `uname -r`.chomp
LINUX_FULL_VERSION = "#{LINUX_ISSUE} (#{LINUX_VERSION})"
HOMEBREW_USER_AGENT = "Homebrew #{HOMEBREW_VERSION} (Ruby #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}; #{LINUX_FULL_VERSION})"
View
2 bin/brew
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
# Many Pathname operations use getwd when they shouldn't, and then throw

0 comments on commit b377445

Please sign in to comment.