helm/rake/pkg/rbenv.rake

32 lines
622 B
Ruby
Raw Normal View History

require_relative '../lib/homebrew'
require_relative '../lib/rbenv'
2014-04-11 00:31:44 -07:00
2014-04-13 08:46:20 -07:00
task :rbenv => 'rbenv:update'
2014-04-11 00:31:44 -07:00
namespace :rbenv do
task :install do
2014-04-13 08:46:20 -07:00
unless Rbenv.is_installed?
echo "Installing rbenv"
Rbenv.bootstrap
end
2014-04-11 00:31:44 -07:00
end
task :remove do
if Rbenv.is_installed?
echo "rbenv isn't installed!"
else
2014-04-13 08:46:20 -07:00
echo "Deleting rbenv"
Rbenv.destroy
end
end
2014-04-11 00:31:44 -07:00
2014-06-17 19:28:52 -07:00
task :update => "rbenv:install" do
2014-08-21 00:29:03 -07:00
Rbenv.installed_versions.each do |v|
2014-04-13 08:46:20 -07:00
echo "Updating ruby #{v}"
Rbenv.update v
2014-04-11 00:31:44 -07:00
end
end
end