Last active
December 18, 2015 21:59
-
-
Save peat/5851531 to your computer and use it in GitHub Desktop.
A simple shell script to pull updates for all of your repos.
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 | |
# | |
# Pulls updates for your repos, including registered submodules. | |
# | |
# Put this file in the directory containing all yer git repos. | |
GITS=`find . -type d -name .git` | |
START=`pwd` | |
for i in $GITS; do | |
REPO=`dirname $i`; | |
echo "\n=> Updating $REPO ..." | |
cd $REPO; | |
git pull | |
git submodule update | |
cd $START | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment