aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/quex.rb
blob: 6303e36f6c19531009eb5d483d62d512235722fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'formula'

class Quex < Formula
  homepage 'http://quex.org/'
  url 'http://downloads.sourceforge.net/project/quex/DOWNLOAD/quex-0.60.2.tar.gz'
  md5 '836b724616020db2e661e4758b265239'

  def install
    libexec.install 'demo', 'quex', 'quex-exe.py'

    # Use a shim script to set QUEX_PATH on the user's behalf
    bin.mkpath
    (bin+'quex').write <<-EOS.undent
      #!/bin/bash
      QUEX_PATH="#{libexec}" "#{libexec}/quex-exe.py" "$@"
    EOS
  end

  def test
    system "#{bin}/quex", "--help"
  end
end