Mercurial > repo
changeset 434:e925c0adf7ad
<elliott> paste lib/karma
author | HackBot |
---|---|
date | Sat, 26 May 2012 16:14:57 +0000 |
parents | f8d51c815266 |
children | 2ccd96410117 |
files | paste/paste.12049 |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/paste/paste.12049 Sat May 26 16:14:57 2012 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh +count () { + hg log --template '{desc}\n' | + egrep '<[^]]*> karma\'$1 | + fgrep -vix "<$2> karma$1 $2" | + cut -d' ' -f3 | + fgrep -cix "$2" +} +plus=$(count + "$1") +minus=$(count - "$1") +echo $(($plus-$minus)) +