Skip to content

Instantly share code, notes, and snippets.

@mururu mururu/exenv.rb
Created Nov 13, 2012

Embed
What would you like to do?
exenv homebrew formula
require 'formula'
class Exenv < Formula
homepage 'https://github.com/mururu/exenv'
url 'https://github.com/mururu/exenv/tarball/v0.1.0'
sha1 '8254e6351c9c5614aaa79923b152671d3585a188'
def install
prefix.install Dir['*']
var_lib = "#{HOMEBREW_PREFIX}/var/lib/exenv/"
['plugins', 'versions'].each do |dir|
var_dir = "#{var_lib}/#{dir}"
mkdir_p var_dir
ln_sf var_dir, "#{prefix}/#{dir}"
end
end
def caveats; <<-EOS.undent
To enable shims and autocompletion add to your profile:
if which exenv > /dev/null; then eval "$(exenv init -)"; fi
To use Homebrew's directories rather than ~/.exenv add to your profile:
export EXENV_ROOT=#{opt_prefix}
EOS
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.