Created
November 21, 2018 22:31
-
-
Save Mazuh/05bd1d4bab6e3d6f6fbe86ccb9fa03a7 to your computer and use it in GitHub Desktop.
Script for reading stats for the git blames of Verto code over the years.
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
echo "Analyzing..." | |
for filename in ./*.js; do | |
total=`git blame $filename | wc -l` | |
echo "$filename" | |
for year in 2014 2015 2016 2017 2018; do | |
yearly=`git blame $filename | grep ".*$year-\d\d-\d\d.*" | wc -l` | |
percent=`expr 100 \* $yearly / $total` | |
tonys_yearly=`git blame $filename | grep ".*Anthony Minessale.*$year-\d\d-\d\d.*" | wc -l` | |
tonys_percent=`expr 100 \* $tonys_yearly / $total` | |
echo " $year: $yearly (yearly $percent% by everyone and $tonys_percent% by Anthony)" | |
done | |
echo " total: $total lines of git blame" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment