Last active
August 29, 2015 14:17
-
-
Save or9/cf58d70da9766e6827c6 to your computer and use it in GitHub Desktop.
Update script for looping through Git repos in a directory and updating each. Useful for Pathogen if using VIM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Example filesystem: | |
# ~/.vimrc/bundle/YouCompleteMe | |
# …nerdtree | |
# …molokai | |
# …clang_complete | |
# …vim-airline | |
# | |
# Usage (assuming this file's name is update.sh) | |
# cd ~/.vimrc/bundle | |
# ./update.sh | |
find . -type d -name .git \ | |
| xargs -n 1 dirname \ | |
| sort \ | |
| while read line; do echo $line && cd $line && git pull && git submodule update --init --recursive && cd ..; done | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment