From 6988e525eb767b5eae5ea8a63e4a98cb53e0d6a1 Mon Sep 17 00:00:00 2001 From: bretello Date: Mon, 17 Jul 2017 01:59:38 +0200 Subject: [PATCH] Updated selfupdate function to include custom oh-my-zsh plugins --- functions.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/functions.sh b/functions.sh index 83cdc28..c8df6bd 100755 --- a/functions.sh +++ b/functions.sh @@ -4,7 +4,18 @@ ## Selfupdate function dotfiles_selfupdate { + # Pull dotfiles (cd $DOTFILES; git pull) + WD=$PWD + # Update all git repos in $ZSH/custom/plugins + cd $ZSH/custom/plugins + for folder in $(ls); do + if [[ -f "$folder/.git" ]]; then + (cd $folder; git pull) + fi + done + # go back to previous working directory + cd $WD } ## get cheat sheets for commands from cheat.sh. Usage: cheat commandname