2011-08-14 18:10:54 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Rbenv < Formula
|
|
|
|
homepage 'https://github.com/sstephenson/rbenv'
|
2013-01-04 19:32:21 +00:00
|
|
|
url 'https://github.com/sstephenson/rbenv/tarball/v0.4.0'
|
|
|
|
sha1 'a5e80249f985294c1c9f0914f7cbdc85d4cadd74'
|
2011-08-14 18:10:54 +00:00
|
|
|
|
|
|
|
head 'https://github.com/sstephenson/rbenv.git'
|
|
|
|
|
|
|
|
def install
|
|
|
|
prefix.install Dir['*']
|
2012-10-30 14:29:21 +00:00
|
|
|
|
|
|
|
var_lib = "#{HOMEBREW_PREFIX}/var/lib/rbenv/"
|
|
|
|
['plugins', 'versions'].each do |dir|
|
|
|
|
var_dir = "#{var_lib}/#{dir}"
|
|
|
|
mkdir_p var_dir
|
|
|
|
ln_sf var_dir, "#{prefix}/#{dir}"
|
|
|
|
end
|
2011-08-14 18:10:54 +00:00
|
|
|
end
|
2012-02-18 22:01:32 +00:00
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
2012-10-30 14:29:21 +00:00
|
|
|
To enable shims and autocompletion add to your profile:
|
2012-05-04 20:44:04 +00:00
|
|
|
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
|
2012-10-30 14:29:21 +00:00
|
|
|
|
|
|
|
To use Homebrew's directories rather than ~/.rbenv add to your profile:
|
|
|
|
export RBENV_ROOT=#{opt_prefix}
|
2012-02-18 22:01:32 +00:00
|
|
|
EOS
|
|
|
|
end
|
2011-08-14 18:10:54 +00:00
|
|
|
end
|