Init rbenv after install

This commit is contained in:
Henrik Lissner 2014-09-01 11:31:11 -04:00
parent b57fac5abf
commit 417e517cc5

View file

@ -21,15 +21,14 @@ namespace :rbenv do
"rkh/rbenv-whatis", "rkh/rbenv-whatis",
"rkh/rbenv-use" "rkh/rbenv-use"
].each { |pkg| github pkg, "#{RBENV_ROOT}/plugins/" } ].each { |pkg| github pkg, "#{RBENV_ROOT}/plugins/" }
sh_safe "eval $(~/.rbenv/bin/rbenv init -)"
end end
end end
task :update => "rbenv:install" do task :update => "rbenv:install" do
echo "Updating rbenv & plugins" echo "Updating rbenv & plugins"
sh_safe "cd #{RBENV_ROOT} && git pull" sh_safe "rbenv update"
rbenv_plugins do |dir|
sh_safe "cd #{dir} && git pull"
end
rbenv_versions do |version| rbenv_versions do |version|
echo "Updating ruby #{version}" echo "Updating ruby #{version}"
@ -42,11 +41,9 @@ namespace :rbenv do
end end
end end
desc "Remove rbenv & installed rubies" if rbenv_installed?
task :remove do desc "Remove rbenv & installed rubies"
if rbenv_installed? task :remove do
echo "rbenv isn't installed!"
else
echo "Deleting rbenv" echo "Deleting rbenv"
sh_safe "rm -rf #{RBENV_ROOT}" sh_safe "rm -rf #{RBENV_ROOT}"
end end