Last active
August 16, 2017 20:22
-
-
Save spenserpothier/4a8b4899f18f579870d7ca0624a3ad5b to your computer and use it in GitHub Desktop.
Script to figure out how much code type work I did this week
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/zsh | |
ls -1 -d */ | while read i | |
do | |
cd "$i" | |
if [ -d .git ] | |
then | |
{ | |
ncommits=$(eval 'git log --oneline --author="Spenser" --since="`date -v monday`" | wc -l' 2> /dev/null ) | |
} || { | |
ncommits=-1 | |
} | |
if [ $ncommits -gt 0 ] | |
then | |
echo "------------ $i ------------" | |
git --no-pager log --since="`date -v monday`" --stat --author="Spenser" --oneline | |
fi | |
fi | |
cd ~/source/ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment