From: Stefan Schweizer Date: Tue, 25 Jul 2006 11:42:29 +0000 (+0000) Subject: new stats script. Not very useful yet. I am thinking of a better solution. X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=3a2a88ce1f589e510e56dcb2b825e140a4669b34;p=~andy%2Fsunrise new stats script. Not very useful yet. I am thinking of a better solution. svn path=/sunrise/; revision=697 --- diff --git a/scripts/create-stats.sh b/scripts/create-stats.sh index e5aaabfab..250112fab 100755 --- a/scripts/create-stats.sh +++ b/scripts/create-stats.sh @@ -1,27 +1,27 @@ #!/bin/bash -bugsin=$(ls */*/ChangeLog -d | xargs grep -i bug | grep -oE "[0-9]{2}[0-9]+") -ebuildsin=$(ls */*/ChangeLog -d | xargs grep -il bug | sed -e "s:/ChangeLog::") +ebuilds=$(ls *-*/* -d) -declare -a bugs ebuilds cc +#declare -a bugs ebuilds cc -a=0 -for i in ${ebuildsin}; do - ebuilds[$a]=${i} - a=$[ $a+1 ]; -done +#a=0 +#for i in ${ebuildsin}; do +# ebuilds[$a]=${i} +# a=$[ $a+1 ]; +#done # second loop -a=0 -for i in ${bugsin}; do - bugs[$a]=${i} - a=$[ $a+1 ]; -done +#a=0 +#for i in ${bugsin}; do +# bugs[$a]=${i} +# a=$[ $a+1 ]; +#done -for ((i=0;i<${#ebuilds[@]};i++)) do - cc[$i]=$(wget bugs.gentoo.org/${bugs[$i]} -q -O - | sed -e "s:@:@:" | grep "value=.*@gentoo.org" | sed -e 's:[^"]*"\([^@]*\).*:\1:' | sed "s:maintainer-wanted::"); - if [ -z "$1" ] || [ "${cc[$i]/$1}" != "${cc[$i]}" ]; then - echo ${ebuilds[$i]} - bug ${bugs[$i]} - on CC: ${cc[$i]}; - fi +for i in $ebuilds; do + bug=$(grep -oE "[0-9]{2}[0-9]+" $i/ChangeLog | tail -n 1) + bugz get $bug > /tmp/crst + cc=$(grep CC /tmp/crst | sed -e "s/CC : //"); + assignee=$(grep Assignee /tmp/crst | sed -e "s/Assignee : //"); + echo $i - bug $bug - $assignee - on CC: $cc; done