homebrew-core/Formula/languagetool.rb
Chongyu Zhu 6582c4463e
languagetool 4.4
Closes #35490.

Signed-off-by: Chongyu Zhu <i@lembacon.com>
2018-12-28 01:25:33 +08:00

26 lines
815 B
Ruby

class Languagetool < Formula
desc "Style and grammar checker"
homepage "https://www.languagetool.org/"
url "https://languagetool.org/download/LanguageTool-4.4.zip"
sha256 "8362ecd238d33866919516f69f440d12411a0ea509e0d54b1ff08aef3ebea5db"
bottle :unneeded
depends_on :java => "1.8+"
def server_script(server_jar); <<~EOS
#!/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