Mercurial > repo
comparison lib/karma @ 0:e037173e0012
Initial import.
author | HackBot |
---|---|
date | Thu, 16 Feb 2012 19:42:32 +0000 |
parents | |
children | ad5c5d1b7d04 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e037173e0012 |
---|---|
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 |