homebrew-core/Formula/datomic.rb
Xu Cheng 3b82c75c07 datomic: set JAVA_HOME by :java and using write_env_script
Closes Homebrew/homebrew#37141.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-02-24 16:48:13 +08:00

31 lines
961 B
Ruby

class Datomic < Formula
homepage "http://www.datomic.com/"
url "https://my.datomic.com/downloads/free/0.9.5130"
sha256 "3fd1d7a8a2c400f570899e6bb77af246ea7d7561f7692b84f299064b8b22b681"
version "0.9.5130"
depends_on :java
def install
libexec.install Dir["*"]
(bin/"datomic").write_env_script libexec/"bin/datomic", :JAVA_HOME => ENV["JAVA_HOME"]
%w[transactor repl repl-jline rest shell].each do |file|
(bin/"datomic-#{file}").write_env_script libexec/"bin/#{file}", :JAVA_HOME => ENV["JAVA_HOME"]
end
end
def caveats
<<-EOS.undent
All commands have been installed with the prefix "datomic-".
We agreed to the Datomic Free Edition License for you:
http://www.datomic.com/datomic-free-edition-license.html
If this is unacceptable you should uninstall.
EOS
end
test do
help = pipe_output("#{bin}/datomic-shell", "Shell.help();\n")
assert_match(/^\* Basics/, help)
end
end