require 'formula' class RubyBuild < Formula homepage 'https://github.com/sstephenson/ruby-build' url 'https://github.com/sstephenson/ruby-build/tarball/v20121120' sha1 '4849e52bab5815d34ae8bac644094711bb04cbf8' head 'https://github.com/sstephenson/ruby-build.git' option "without-rbenv", "Don't install as an rbenv plugin" depends_on 'rbenv' unless build.include? 'without-rbenv' def install ENV['PREFIX'] = prefix system "./install.sh" rbenv_plugins = "#{HOMEBREW_PREFIX}/var/lib/rbenv/plugins" mkdir_p rbenv_plugins ln_sf opt_prefix, "#{rbenv_plugins}/#{name}" unless build.include? 'without-rbenv' end end