From 8136a7cec5ff09a94e79994fd6f00a01dbaac80a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 20 May 2015 22:53:37 -0400 Subject: [PATCH] Add bin/update script --- bin/update | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 bin/update diff --git a/bin/update b/bin/update new file mode 100755 index 00000000..0e956f62 --- /dev/null +++ b/bin/update @@ -0,0 +1,27 @@ +#!/bin/zsh + +brew update && brew upgrade --all +cd "$HOME/.emacs.d" && git pull && make +cd "$HOME/.dotfiles" && git pull + +local i +if [ -d ~/.rbenv ]; then + cd "$HOME/.rbenv" && git pull + for i in "$HOME"/.rbenv/plugins/*; do + cd "$i" && git pull + done +fi + +if [ -d ~/.pyenv ]; then + cd "$HOME/.pyenv" && git pull + for i in "$HOME"/.pyenv/plugins/*; do + cd "$i" && git pull + done +fi + +if [ -d ~/.zprezto ]; then + cd "$HOME/.zprezto" + git fetch parent + git submodule foreach git checkout master + git submodule foreach git pull +fi