From 53e9c194175922a76a39e745cf530be7bf2f4d36 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 7 Mar 2013 03:25:23 -0500 Subject: [PATCH] Add function to update homebrew, rvm, rubies, rubygems and vim --- zsh/aliases | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/zsh/aliases b/zsh/aliases index cc152e28..c15b83a3 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -32,3 +32,25 @@ alias gbr='g br' function quick-look() { (( $# > 0 )) && qlmanage -p $* &>/dev/null & } + +function update() { + # Update homebrew + brew update + brew upgrade + + # Make sure rvm is sourced properly + if [ -f ~/.rvm/scripts/rvm ]; then + [ "$(type -t rvm)" = "function" ] || source ~/.rvm/scripts/rvm + fi + + # Update all rubies and rubygems + for v in 1.9.3 1.8.7 system; do + rvm use $v + gem update --system + gem update + done + + # Update vim + echo "[NOTICE] Updating vim..." + screen -d -m vim +BundleInstall! +BundleClean! +q +q +}