Created
April 20, 2018 13:58
-
-
Save de1o/099be5eece4d853b9d445848cca3d3fb to your computer and use it in GitHub Desktop.
weekly-commits
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 | |
last_sunday=`date -v-sunday +"%Y-%m-%d"` | |
author=`git config --get user.name` | |
cmd="git shortlog --author=$author --after=$last_sunday --oneline" | |
echo $cmd | |
for i in `ls .`;do | |
if [ -d ~/Codes/$i ];then | |
cd ~/Codes/$i | |
if [ ! -d ".git" ];then | |
continue | |
else | |
result=`$cmd` | |
if [ ! -z "$result" ];then | |
echo "=========================================" | |
echo -e "working on $i\n" | |
echo -e "$result"|grep -v "Merge branch" | |
fi | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment