summaryrefslogtreecommitdiffstats
path: root/update-bugs.sh
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-04-24 19:24:00 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-04-24 19:24:00 +0100
commitd16868b9381ea696f7ed5d22b7d0c1a3bb56f0b3 (patch)
tree75c366cde7377fed98be71228d2a6bdbb3878b99 /update-bugs.sh
parent37a3cdbc139167d7b77d84a761f681595ff7fc23 (diff)
downloadlibguestfs-d16868b9381ea696f7ed5d22b7d0c1a3bb56f0b3.tar.gz
libguestfs-d16868b9381ea696f7ed5d22b7d0c1a3bb56f0b3.tar.xz
libguestfs-d16868b9381ea696f7ed5d22b7d0c1a3bb56f0b3.zip
bugs: Print count of bugs in each section.
Diffstat (limited to 'update-bugs.sh')
-rwxr-xr-xupdate-bugs.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/update-bugs.sh b/update-bugs.sh
index 5f718871..4eece23d 100755
--- a/update-bugs.sh
+++ b/update-bugs.sh
@@ -50,6 +50,7 @@ When reporting a new bug, please check:
'
lastclass=X
+count=0
while read bugno status summary; do
# Ignore CLOSED bugs in this list.
if [ "$status" = "CLOSED" ]; then continue; fi
@@ -66,6 +67,11 @@ while read bugno status summary; do
# MODIFIED, ..., CLOSED. Therefore start a new section when the
# status field changes.
if [ "$bugclass" != "$lastclass" ]; then
+ if [ $count -ge 1 ]; then
+ echo "($count bugs)"
+ echo
+ fi
+ count=0
echo '--------------------------------------------------'
case "$bugclass" in
NEW)
@@ -81,6 +87,7 @@ while read bugno status summary; do
esac
echo
fi
+ ((count++)) ||:
lastclass=$bugclass
# Display the bug.
@@ -89,6 +96,10 @@ while read bugno status summary; do
echo
done < .bugs.tmp
+if [ $count -ge 1 ]; then
+ echo "($count bugs)"
+ echo
+fi
echo "End of BUGS file."
# Clean up temporary file.