Skip to content

Instantly share code, notes, and snippets.

@mururu
Created November 13, 2012 00:19
Show Gist options
  • Save mururu/4062993 to your computer and use it in GitHub Desktop.
Save mururu/4062993 to your computer and use it in GitHub Desktop.
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