Last active
December 21, 2015 07:49
-
-
Save Quantium/6274041 to your computer and use it in GitHub Desktop.
This is a little shell script for update, join and run gitstats on several repositories in order to see only one gitstats project
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 | |
echo -------- | |
allrepos=''; | |
c=0; | |
for D in ~/repos/*;do | |
if [ -d "${D}" ]; | |
then | |
cd "${D}"; | |
pwd; | |
#Can't exist a repository with the name 'www'" | |
if [ ${D} = ~/repos/www ]; | |
then | |
echo "Can't exist a repository with the name 'www'"; | |
else | |
git pull; | |
allrepos="${D} ${allrepos}"; | |
fi; | |
c=$(echo "$c + 1" | bc); | |
fi; | |
done; | |
#Not used anymore: | |
#allrepos=$(echo $allrepos | cut -d " " -f 2-$c) | |
gitstats $allrepos ~/www | |
echo $c updated repositories |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment