aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/git-hg.rb
blob: fac0be430c451f86b3640a8dfc79558b265094e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'formula'

class HgInstalled < Requirement
  def message; <<-EOS.undent
    Mercurial is required to use this software.

    You can install this with Homebrew using:
      brew install mercurial

    Or you can use an official installer from:
      http://mercurial.selenic.com/
    EOS
  end
  def satisfied?
    which 'hg'
  end
end

class GitHg < Formula
  head 'https://github.com/offbytwo/git-hg.git'
  homepage 'http://offbytwo.com/git-hg/'

  depends_on HgInstalled.new

  def install
    prefix.install Dir['*']
  end
end