Last active
October 7, 2017 06:29
-
-
Save apux/3724738 to your computer and use it in GitHub Desktop.
Update multiple git repositories
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 | |
dirs=`ls -1d */` | |
for d in $dirs | |
do | |
echo $d | |
echo '======================' | |
IFS=$'\n' lines=($(cd $d; git pull)) | |
for l in $lines | |
do | |
echo $l | |
done | |
echo | |
echo '------------------------------------------------' | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment