homebrew-core/Formula/jenv.rb
Gildas Cuisinier 02f2762f96 jenv 0.4.2
jenv 0.4.2

Closes Homebrew/homebrew#33651.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-10-27 21:59:01 +00:00

28 lines
803 B
Ruby

require "formula"
class Jenv < Formula
homepage "http://www.jenv.be"
url "https://github.com/gcuisinier/jenv/archive/0.4.2.tar.gz"
sha1 "4cb3c705cd11ff5c0281119d984e7b270b4b4129"
head "https://github.com/gcuisinier/jenv.git"
def install
libexec.install Dir["*"]
bin.write_exec_script libexec/"bin/jenv"
end
def caveats; <<-EOS.undent
To enable shims and autocompletion add to your profile:
if which jenv > /dev/null; then eval "$(jenv init -)"; fi
To use Homebrew's directories rather than ~/.jenv add to your profile:
export JENV_ROOT=#{opt_prefix}
EOS
end
test do
(testpath/".java-version").write "homebrew-test"
output = `jenv version 2>&1`
assert output.include? "jenv: version `homebrew-test' is not installed"
end
end