From 417e517cc5ebedc5d846db8c3f514c80aa797b84 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 1 Sep 2014 11:31:11 -0400 Subject: [PATCH] Init rbenv after install --- rake/pkg/rbenv.rake | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/rake/pkg/rbenv.rake b/rake/pkg/rbenv.rake index 4058889e..9b620d5d 100644 --- a/rake/pkg/rbenv.rake +++ b/rake/pkg/rbenv.rake @@ -21,15 +21,14 @@ namespace :rbenv do "rkh/rbenv-whatis", "rkh/rbenv-use" ].each { |pkg| github pkg, "#{RBENV_ROOT}/plugins/" } + + sh_safe "eval $(~/.rbenv/bin/rbenv init -)" end end task :update => "rbenv:install" do echo "Updating rbenv & plugins" - sh_safe "cd #{RBENV_ROOT} && git pull" - rbenv_plugins do |dir| - sh_safe "cd #{dir} && git pull" - end + sh_safe "rbenv update" rbenv_versions do |version| echo "Updating ruby #{version}" @@ -42,11 +41,9 @@ namespace :rbenv do end end - desc "Remove rbenv & installed rubies" - task :remove do - if rbenv_installed? - echo "rbenv isn't installed!" - else + if rbenv_installed? + desc "Remove rbenv & installed rubies" + task :remove do echo "Deleting rbenv" sh_safe "rm -rf #{RBENV_ROOT}" end