aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os.rb
blob: 9d98860501f4fe9324f8894e9705bfc43d6c7335 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module OS
  def self.mac?
    /darwin/i === RUBY_PLATFORM
  end

  def self.linux?
    /linux/i === RUBY_PLATFORM
  end

  if OS.mac?
    ISSUES_URL = "https://github.com/Homebrew/homebrew/wiki/troubleshooting"
    PATH_OPEN = "/usr/bin/open"
  elsif OS.linux?
    ISSUES_URL = "https://github.com/Homebrew/linuxbrew/wiki/troubleshooting"
    PATH_OPEN = "xdg-open"
  else
    raise "Unknown operating system"
  end
end