Created
September 4, 2010 02:24
-
-
Save nandub/564832 to your computer and use it in GitHub Desktop.
Simple bash script to update all git-clone repos from a local directory
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/bash | |
f=$(pwd) # 'pwd' is "present working directory" | |
FOLDERS=`ls -d $f/*` | |
for f in $FOLDERS | |
do | |
if [ -d "$f/.git" ]; then | |
pushd $f | |
git pull | |
popd -n | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment