Show which Perl, Python and Ruby are in the path.
This commit is contained in:
parent
706da00b72
commit
8fe17772bb
@ -36,8 +36,36 @@ module Homebrew extend self
|
|||||||
if sha.empty? then "(none)" else sha end
|
if sha.empty? then "(none)" else sha end
|
||||||
end
|
end
|
||||||
|
|
||||||
def system_ruby
|
def describe_perl
|
||||||
Pathname.new('/usr/bin/ruby').realpath.to_s
|
perl = `which perl`.chomp
|
||||||
|
return "N/A" unless perl
|
||||||
|
|
||||||
|
real_perl = Pathname.new(perl).realpath.to_s
|
||||||
|
return perl if perl == real_perl
|
||||||
|
return "#{perl} => #{real_perl}"
|
||||||
|
end
|
||||||
|
|
||||||
|
def describe_python
|
||||||
|
python = `which python`.chomp
|
||||||
|
return "N/A" unless python
|
||||||
|
|
||||||
|
real_python = Pathname.new(python).realpath.to_s
|
||||||
|
|
||||||
|
return python if python == real_python
|
||||||
|
return "#{python} => #{real_python}"
|
||||||
|
end
|
||||||
|
|
||||||
|
def describe_ruby
|
||||||
|
ruby = `which ruby`.chomp
|
||||||
|
return "N/A" unless ruby
|
||||||
|
|
||||||
|
real_ruby = Pathname.new(ruby).realpath.to_s
|
||||||
|
return ruby if ruby == real_ruby
|
||||||
|
return "#{ruby} => #{real_ruby}"
|
||||||
|
end
|
||||||
|
|
||||||
|
def real_path a_path
|
||||||
|
Pathname.new(a_path).realpath.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def config_s; <<-EOS.undent
|
def config_s; <<-EOS.undent
|
||||||
@ -48,8 +76,6 @@ module Homebrew extend self
|
|||||||
Hardware: #{Hardware.cores_as_words}-core #{Hardware.bits}-bit #{Hardware.intel_family}
|
Hardware: #{Hardware.cores_as_words}-core #{Hardware.bits}-bit #{Hardware.intel_family}
|
||||||
OS X: #{MACOS_FULL_VERSION}
|
OS X: #{MACOS_FULL_VERSION}
|
||||||
Kernel Architecture: #{`uname -m`.chomp}
|
Kernel Architecture: #{`uname -m`.chomp}
|
||||||
Ruby: #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}
|
|
||||||
/usr/bin/ruby => #{system_ruby}
|
|
||||||
Xcode: #{xcode_version}
|
Xcode: #{xcode_version}
|
||||||
GCC-4.0: #{gcc_40 ? "build #{gcc_40}" : "N/A"}
|
GCC-4.0: #{gcc_40 ? "build #{gcc_40}" : "N/A"}
|
||||||
GCC-4.2: #{gcc_42 ? "build #{gcc_42}" : "N/A"}
|
GCC-4.2: #{gcc_42 ? "build #{gcc_42}" : "N/A"}
|
||||||
@ -57,6 +83,11 @@ module Homebrew extend self
|
|||||||
Clang: #{clang ? "#{clang} build #{clang_build}" : "N/A"}
|
Clang: #{clang ? "#{clang} build #{clang_build}" : "N/A"}
|
||||||
MacPorts or Fink? #{macports_or_fink_installed?}
|
MacPorts or Fink? #{macports_or_fink_installed?}
|
||||||
X11 installed? #{x11_installed?}
|
X11 installed? #{x11_installed?}
|
||||||
|
System Ruby: #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}
|
||||||
|
/usr/bin/ruby => #{real_path("/usr/bin/ruby")}
|
||||||
|
Which Perl: #{describe_perl}
|
||||||
|
Which Python: #{describe_python}
|
||||||
|
Which Ruby: #{describe_ruby}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user