homebrew-core/Formula/jenv.rb

28 lines
768 B
Ruby
Raw Normal View History

class Jenv < Formula
desc "Manage your Java environment"
homepage "http://www.jenv.be"
url "https://github.com/gcuisinier/jenv/archive/0.4.3.tar.gz"
sha256 "aa8e5f9da2e89f3c28550bdcc49746b29b14a82ee0b06025dda4a859aa26b69b"
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
def install
libexec.install Dir["*"]
bin.write_exec_script libexec/"bin/jenv"
end
def caveats; <<-EOS.undent
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
To enable shims and autocompletion add to your profile:
if which jenv > /dev/null; then eval "$(jenv init -)"; fi
EOS
end
test do
2015-10-22 13:46:02 +00:00
shell_output("eval \"$(#{bin}/jenv init -)\" && jenv versions")
end
end