embulk: use shell wrapper, require java 1.7+

- support Mac OS 10.9 using the same exec script with digdag
- embulk requires java 1.7+

Closes #2261.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
This commit is contained in:
Sadayuki Furuhashi 2016-06-21 14:31:20 -07:00 committed by Martin Afanasjew
parent 41a15fbb8e
commit ea98100b35

View file

@ -6,14 +6,15 @@ class Embulk < Formula
bottle :unneeded bottle :unneeded
depends_on :java depends_on :java => "1.7+"
skip_clean "libexec"
def install def install
(libexec/"bin").install "embulk-#{version}.jar" => "embulk" # Execute through /bin/bash to be compatible with OS X 10.9.
chmod 0755, libexec/"bin/embulk" libexec.install "embulk-#{version}.jar" => "embulk.jar"
bin.write_exec_script libexec/"bin/embulk" (bin/"embulk").write <<-EOS.undent
#!/bin/bash
exec /bin/bash "#{libexec}/embulk.jar" "$@"
EOS
end end
test do test do