2013-01-29 15:07:25 +00:00
|
|
|
class Jenv < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Manage your Java environment"
|
2013-01-29 15:07:25 +00:00
|
|
|
homepage "http://www.jenv.be"
|
2015-06-07 14:55:27 +00:00
|
|
|
url "https://github.com/gcuisinier/jenv/archive/0.4.3.tar.gz"
|
|
|
|
sha256 "aa8e5f9da2e89f3c28550bdcc49746b29b14a82ee0b06025dda4a859aa26b69b"
|
2013-01-29 15:07:25 +00:00
|
|
|
head "https://github.com/gcuisinier/jenv.git"
|
|
|
|
|
2015-10-22 13:46:02 +00:00
|
|
|
bottle :unneeded
|
2015-06-07 15:20:35 +00:00
|
|
|
|
2013-01-29 15:07:25 +00:00
|
|
|
def install
|
2015-08-03 12:55:31 +00:00
|
|
|
libexec.install Dir["*"]
|
|
|
|
bin.write_exec_script libexec/"bin/jenv"
|
2013-01-29 15:07:25 +00:00
|
|
|
end
|
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
def caveats; <<-EOS.undent
|
2013-01-29 15:07:25 +00:00
|
|
|
To use Homebrew's directories rather than ~/.jenv add to your profile:
|
2015-10-22 13:46:02 +00:00
|
|
|
export JENV_ROOT=#{var}/jenv
|
2015-11-02 16:31:20 +00:00
|
|
|
|
|
|
|
To enable shims and autocompletion add to your profile:
|
|
|
|
if which jenv > /dev/null; then eval "$(jenv init -)"; fi
|
2013-01-29 15:07:25 +00:00
|
|
|
EOS
|
2015-08-03 12:55:31 +00:00
|
|
|
end
|
2013-01-29 15:07:25 +00:00
|
|
|
|
|
|
|
test do
|
2015-10-22 13:46:02 +00:00
|
|
|
shell_output("eval \"$(#{bin}/jenv init -)\" && jenv versions")
|
2013-01-29 15:07:25 +00:00
|
|
|
end
|
|
|
|
end
|