Last active
December 23, 2015 01:01
-
-
Save kuniyoshi/1cb15c959d0733c40226 to your computer and use it in GitHub Desktop.
count diff
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 | |
date +%FT%T | |
git diff --stat 2>/dev/null | tail -1 | |
git status --untracked-files=all \ | |
| awk '/Untracked files/{p=1} p {print $1}' \ | |
| awk '/\.cpp$/ { print$1 } /\.h$/ { print$1 }' \ | |
| xargs wc \ | |
| awk '/\.cpp$/{++count} /\.h$/{++count} /total/{print count, "new files", $1, "new lines"}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment