homebrew-core/Formula/jenv.rb

29 lines
663 B
Ruby

class Jenv < Formula
desc "Manage your Java environment"
homepage "https://www.jenv.be/"
url "https://github.com/jenv/jenv/archive/0.5.2.tar.gz"
sha256 "4cdce828bfaeb6561733bab641ed2912107a8bc24758a17f2387ee78403afb9a"
head "https://github.com/gcuisinier/jenv.git"
bottle :unneeded
def install
libexec.install Dir["*"]
bin.write_exec_script libexec/"bin/jenv"
end
def caveats
<<~EOS
To activate jenv, add the following to your #{shell_profile}:
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"
EOS
end
test do
shell_output("eval \"$(#{bin}/jenv init -)\" && jenv versions")
end
end