kaitai-struct-compiler: use shipped launch wrapper (#25967)

This commit is contained in:
Fridtjof Mund 2018-06-18 17:02:18 +02:00 committed by ilovezfs
parent 45cf1ed07e
commit c58fde35d6

View file

@ -3,18 +3,15 @@ class KaitaiStructCompiler < Formula
homepage "https://kaitai.io/"
url "https://bintray.com/artifact/download/kaitai-io/universal/0.8/kaitai-struct-compiler-0.8.zip"
sha256 "545fc10e134db2901cad8817be1b440fca6f2bad8b92b2948ebe0647f3ffa2c9"
revision 1
bottle :unneeded
depends_on :java => "1.8+"
def install
libexec.install Dir["lib/*"]
(bin/"kaitai-struct-compiler").write <<~EOS
#!/bin/bash
java -cp "#{libexec}/*" io.kaitai.struct.JavaMain "$@"
EOS
libexec.install Dir["*"]
bin.install_symlink libexec/"bin/kaitai-struct-compiler"
end
test do
@ -27,7 +24,7 @@ class KaitaiStructCompiler < Formula
- id: header
type: u4
EOS
system bin/"kaitai-struct-compiler", "Test.ksy", "-t", "java", "-d", testpath
system bin/"kaitai-struct-compiler", "Test.ksy", "-t", "java", "--outdir", testpath
assert_predicate testpath/"src/Test.java", :exist?
end
end