Created
May 23, 2011 05:29
-
-
Save axolx/986265 to your computer and use it in GitHub Desktop.
Pull & update all git or mercurial repos in a directory (e.g. vim pathogen bundles)
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
for d in `ls -1`; do | |
if [ -d $d/.git ]; then | |
cd $d | |
git pull | |
cd .. | |
elif [ -d $d/.hg ]; then | |
cd $d | |
hg pull -u | |
cd .. | |
else | |
echo "$d is not a git or hg repo" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment