homebrew-core/Formula/languagetool.rb
techaddicted 4f64bfc515 languagetool 3.7
Closes #14701.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
2017-06-18 20:27:41 -07:00

25 lines
795 B
Ruby

class Languagetool < Formula
desc "Style and grammar checker"
homepage "https://www.languagetool.org/"
url "https://languagetool.org/download/LanguageTool-3.7.zip"
sha256 "a97763a32e15b3f7d16e235b0137462d9699548d9d5a88b2f7764c21c04f2412"
bottle :unneeded
def server_script(server_jar); <<-EOS.undent
#!/bin/bash
exec java -cp #{server_jar} org.languagetool.server.HTTPServer "$@"
EOS
end
def install
libexec.install Dir["*"]
bin.write_jar_script libexec/"languagetool-commandline.jar", "languagetool"
(bin+"languagetool-server").write server_script(libexec/"languagetool-server.jar")
bin.write_jar_script libexec/"languagetool.jar", "languagetool-gui"
end
test do
pipe_output("#{bin}/languagetool -l en-US -", "This is a test.")
end
end