31 lines
950 B
Ruby
31 lines
950 B
Ruby
class Languagetool < Formula
|
|
desc "Style and grammar checker"
|
|
homepage "https://www.languagetool.org/"
|
|
url "https://languagetool.org/download/LanguageTool-5.0.zip"
|
|
sha256 "212eb275cf9df8b6f49d8ce2bb386246081be7f01d907577fbd09a9f27055628"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on "openjdk"
|
|
|
|
def install
|
|
libexec.install Dir["*"]
|
|
(bin/"languagetool").write <<~EOS
|
|
#!/bin/bash
|
|
exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/languagetool-commandline.jar" "$@"
|
|
EOS
|
|
(bin/"languagetool-server").write <<~EOS
|
|
#!/bin/bash
|
|
exec "#{Formula["openjdk"].opt_bin}/java" -cp "#{libexec}/languagetool-server.jar" org.languagetool.server.HTTPServer "$@"
|
|
EOS
|
|
(bin/"languagetool-gui").write <<~EOS
|
|
#!/bin/bash
|
|
exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/languagetool.jar" "$@"
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
pipe_output("#{bin}/languagetool -l en-US -", "This is a test.")
|
|
end
|
|
end
|