Created
March 7, 2018 08:47
-
-
Save shashidharatd/7e2681e22fab293391496385504121fd to your computer and use it in GitHub Desktop.
brainless
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 | |
function print_repo_commits() | |
{ | |
repo=$1 | |
cd $repo | |
git log --author=shashidharatd --oneline --branches=master --after=2017-01-01 --before=2017-12-31 --shortstat |sed 's/^ /, /'| sed ':begin;$!N;s/\n//;tbegin' |sed 's/)\?\([0-9a-f]\{7\}\) /)\n\1,/g' |sed 's/, [0-9]\+ files\? changed//;s/insertions\?(+)//;s/, [0-9]\+ deletions\?(-)//' >/tmp/cc_$repo.txt | |
cd - | |
} | |
file_list=$1 | |
while read line | |
do | |
print_repo_commits $line | |
echo $line | |
done<${file_list} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment