Created
October 31, 2017 23:22
-
-
Save mcrmonkey/49c70bacf00b137e18c162d85a9832cd to your computer and use it in GitHub Desktop.
cycle through a bunch of repos and update them
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 | |
BLUE="\033[01;34m" | |
GREEN="\033[01;32m" | |
RED="\033[01;31m" | |
YELLO="\033[01;33m" | |
NORM="\033[00m" | |
for R in $(find * -maxdepth 0 -type d) | |
do | |
( | |
echo -ne "$BLUE $R \n $NORM\n" | |
cd $R | |
for I in $(find * -maxdepth 0 -type d) | |
do | |
( | |
cd $I | |
echo -ne "\t $I $NORM " | |
git pull >/dev/null 2>&1 && echo -ne "\r [$GREEN OK $NORM]\n" || echo -ne "\r [$RED ER $NORM]\n\n" | |
) | |
done | |
echo -ne "\n\n" | |
) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment