aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/dash.rb
blob: 3ce063ca9c08d985cdc0e4a86648f3a59e1ff63d (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
29
30
require 'formula'

class Dash < Formula
  homepage 'http://gondor.apana.org.au/~herbert/dash/'
  url 'http://gondor.apana.org.au/~herbert/dash/files/dash-0.5.7.tar.gz'
  sha1 'a3ebc16f2e2c7ae8adf64e5e62ae3dcb631717c6'

  head 'https://git.kernel.org/pub/scm/utils/dash/dash.git'

  depends_on :automake if build.head?

  def install
    if build.head?
      system "aclocal"
      system "autoreconf -f -i -Wall,no-obsolete"
    end

    system "./configure", "--prefix=#{prefix}",
                          "--with-libedit",
                          "--disable-dependency-tracking",
                          "--enable-fnmatch",
                          "--enable-glob"
    system "make"
    system "make install"
  end

  def test
    system "#{bin}/dash", "-c", "echo Hello!"
  end
end