29 lines
838 B
Ruby
29 lines
838 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.6/dita-ot-3.6.zip"
|
|
sha256 "651004cfbd859de2b8e56d470b7fae4385c75fa6d94eae87314713180eeb07aa"
|
|
license "Apache-2.0"
|
|
|
|
livecheck do
|
|
url :stable
|
|
regex(/^v?(\d+(?:\.\d+)+)$/i)
|
|
end
|
|
|
|
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
|