Mercurial > repo
comparison paste/paste.12049 @ 434:e925c0adf7ad
<elliott> paste lib/karma
author | HackBot |
---|---|
date | Sat, 26 May 2012 16:14:57 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
433:f8d51c815266 | 434:e925c0adf7ad |
---|---|
1 #!/bin/sh | |
2 count () { | |
3 hg log --template '{desc}\n' | | |
4 egrep '<[^]]*> karma\'$1 | | |
5 fgrep -vix "<$2> karma$1 $2" | | |
6 cut -d' ' -f3 | | |
7 fgrep -cix "$2" | |
8 } | |
9 plus=$(count + "$1") | |
10 minus=$(count - "$1") | |
11 echo $(($plus-$minus)) | |
12 |