aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/rbenv.rb
blob: 146a5c7698e09ad20eec18fe83974d4e97ed5e9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'formula'

class Rbenv < Formula
  homepage 'https://github.com/sstephenson/rbenv'
  url 'https://github.com/sstephenson/rbenv/tarball/v0.4.0'
  sha1 'a5e80249f985294c1c9f0914f7cbdc85d4cadd74'

  head 'https://github.com/sstephenson/rbenv.git'

  def install
    inreplace 'libexec/rbenv', '/usr/local', HOMEBREW_PREFIX
    prefix.install Dir['*']
  end

  def caveats; <<-EOS.undent
    To enable shims and autocompletion add to your profile:
      if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi

    To use Homebrew's directories rather than ~/.rbenv add to your profile:
      export RBENV_ROOT=#{var}/rbenv
    EOS
  end
end