24 lines
770 B
Ruby
24 lines
770 B
Ruby
class DitaOt < Formula
|
|
desc "DITA Open Toolkit is an implementation of the OASIS DITA specification"
|
|
homepage "https://www.dita-ot.org/"
|
|
url "https://github.com/dita-ot/dita-ot/releases/download/3.5.2/dita-ot-3.5.2.zip"
|
|
sha256 "f88361b54b5225e2f0ce8b486f4e9a6c5e713620658350178249fa0c9da5edd2"
|
|
license "Apache-2.0"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on "openjdk"
|
|
|
|
def install
|
|
rm_f Dir["bin/*.bat", "config/env.bat", "startcmd.*"]
|
|
libexec.install Dir["*"]
|
|
(bin/"dita").write_env_script libexec/"bin/dita", JAVA_HOME: Formula["openjdk"].opt_prefix
|
|
end
|
|
|
|
test do
|
|
system bin/"dita", "--input=#{libexec}/docsrc/site.ditamap",
|
|
"--format=html5", "--output=#{testpath}/out"
|
|
assert_predicate testpath/"out/index.html", :exist?
|
|
end
|
|
end
|