Skip to content

Instantly share code, notes, and snippets.

@cravefoodbr
Created August 9, 2016 20:14
Show Gist options
  • Save cravefoodbr/339a71d370c792f78fd2e38b00802a64 to your computer and use it in GitHub Desktop.
Save cravefoodbr/339a71d370c792f78fd2e38b00802a64 to your computer and use it in GitHub Desktop.
#!/bin/bash
BASE_DIR=$1
repos=""
for git_dir in `cd $BASE_DIR; find . -iname .git`; do
repo=$(dirname "$git_dir");
cd $BASE_DIR/$repo
echo "Updating repo $repo"
git fetch
git pull
repos="$repos $BASE_DIR/$repo"
cd $BASE_DIR
done
echo "Getting git stats"
PYTHONIOENCODING='utf-8' ~/.virtualenvs/gitinspector/bin/gitinspector --format=html --timeline $repos > /tmp/git.html
mv /tmp/git.html ~/Documents/crave-git-stats.html
echo "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment