aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os.rb
blob: 1dc609517e371fff5913c259f44386a1df6dd5fb (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 = "http://git.io/brew-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