diff options
| author | Misty De Meo | 2013-03-21 08:17:26 -0500 | 
|---|---|---|
| committer | Misty De Meo | 2013-03-21 08:37:51 -0500 | 
| commit | 3608c33429bdd8a57aa55991533f6d89a038bce7 (patch) | |
| tree | 701c1f0641b50ca137860469312e7a8ede03dc4a | |
| parent | de693367199097b925162144eec4c5265e4d42e8 (diff) | |
| download | homebrew-3608c33429bdd8a57aa55991533f6d89a038bce7.tar.bz2 | |
Replace remaining shelled-out `which`es
| -rw-r--r-- | Library/Formula/auctex.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/pgplot.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/extend/ENV.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/global.rb | 2 | ||||
| -rwxr-xr-x | Library/brew.rb | 2 | 
5 files changed, 7 insertions, 7 deletions
| diff --git a/Library/Formula/auctex.rb b/Library/Formula/auctex.rb index 6e51fed7f..411facf54 100644 --- a/Library/Formula/auctex.rb +++ b/Library/Formula/auctex.rb @@ -19,7 +19,7 @@ class Auctex < Formula          return a.sub('--with-emacs=', '')        end      end -    return `which emacs`.chomp +    return which 'emacs'    end    def install diff --git a/Library/Formula/pgplot.rb b/Library/Formula/pgplot.rb index 4462f844c..41419f148 100644 --- a/Library/Formula/pgplot.rb +++ b/Library/Formula/pgplot.rb @@ -34,7 +34,7 @@ class Pgplot < Formula      # re-hardcode the share dir      inreplace 'src/grgfil.f', '/usr/local/pgplot', share      # perl may not be in /usr/local -    inreplace 'makehtml', '/usr/local/bin/perl', `which perl`.chomp +    inreplace 'makehtml', '/usr/local/bin/perl', which('perl')      # prevent a "dereferencing pointer to incomplete type" in libpng      inreplace 'drivers/pndriv.c', 'setjmp(png_ptr->jmpbuf)', 'setjmp(png_jmpbuf(png_ptr))' @@ -58,7 +58,7 @@ LIBS="#{ENV.ldflags} -lX11"  MOTIF_LIBS=""  ATHENA_LIBS=""  TK_LIBS="" -RANLIB="#{`which ranlib`.chomp}" +RANLIB="#{which 'ranlib'}"  SHARED_LIB="libpgplot.dylib"  SHARED_LD="#{ENV['FC']} -dynamiclib -single_module $LDFLAGS -lX11 -install_name libpgplot.dylib"  SHARED_LIB_LIBS="#{ENV.ldflags} -lpng -lX11" diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index 186628f5b..0f93a5d6f 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -479,10 +479,10 @@ class << ENV          EOS        end -    elsif `/usr/bin/which gfortran`.chuzzle +    elsif which 'gfortran'        ohai "Using Homebrew-provided fortran compiler."        puts "This may be changed by setting the FC environment variable." -      self['FC'] = `/usr/bin/which gfortran`.chomp +      self['FC'] = which 'gfortran'        self['F77'] = self['FC']        fc_flag_vars.each {|key| self[key] = cflags} diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 761dd1eb7..2ae186c82 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -46,7 +46,7 @@ undef cache # we use a function to prevent adding home_cache to the global scope  HOMEBREW_CACHE_FORMULA = HOMEBREW_CACHE+"Formula"  if not defined? HOMEBREW_BREW_FILE -  HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] || `which brew`.chomp +  HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] || which('brew').to_s  end  HOMEBREW_PREFIX = Pathname.new(HOMEBREW_BREW_FILE).dirname.parent # Where we link under diff --git a/Library/brew.rb b/Library/brew.rb index b6ebf9145..f60d3d426 100755 --- a/Library/brew.rb +++ b/Library/brew.rb @@ -91,7 +91,7 @@ begin        ENV["HOMEBREW_#{e}"] = Object.const_get "HOMEBREW_#{e}"      end      exec "brew-#{cmd}", *ARGV -  elsif require? `/usr/bin/which brew-#{cmd}.rb` +  elsif require? which("brew-#{cmd}.rb").to_s      exit 0    else      onoe "Unknown command: #{cmd}" | 
