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