211b2b29ec
The quick start guide on the antlr website (http://www.antlr.org/) uses a TestRig class inside the antlr jar which the authors aliased as grun. This alias will get installed as a wrapper script. Closes Homebrew/homebrew#29392. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
16 lines
505 B
Ruby
16 lines
505 B
Ruby
require 'formula'
|
|
|
|
class Antlr < Formula
|
|
homepage 'http://www.antlr.org/'
|
|
url 'http://www.antlr.org/download/antlr-4.2.2-complete.jar'
|
|
sha1 '97b3117463b6beda300ee7a297a31b71db9aea2b'
|
|
|
|
def install
|
|
prefix.install "antlr-#{version}-complete.jar"
|
|
bin.write_jar_script prefix/"antlr-#{version}-complete.jar", "antlr4"
|
|
(bin+"grun").write <<-EOS.undent
|
|
#!/bin/bash
|
|
java -classpath #{prefix}/antlr-#{version}-complete.jar:. org.antlr.v4.runtime.misc.TestRig "$@"
|
|
EOS
|
|
end
|
|
end
|