activemq: set JAVA_HOME use write_env_script

Closes Homebrew/homebrew#37136.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-02-24 15:16:52 +08:00
parent b5ace15641
commit a4151e12dc

View file

@ -11,12 +11,11 @@ class Activemq < Formula
prefix.install_metafiles
libexec.install Dir["*"]
bin.write_exec_script libexec/"bin/activemq"
bin.write_exec_script libexec/"bin/activemq-admin"
(bin/"activemq").write_env_script libexec/"bin/activemq", :JAVA_HOME => ENV["JAVA_HOME"]
(bin/"activemq-admin").write_env_script libexec/"bin/activemq-admin", :JAVA_HOME => ENV["JAVA_HOME"]
end
test do
ENV["JAVA_HOME"] = `/usr/libexec/java_home`.chomp
system "#{bin}/activemq-admin", "browse", "-h"
end
end