[Po4a-commits] po4a/testsuite stats.sh,1.1,1.2
Nicolas FRAN??OIS
po4a-devel@lists.alioth.debian.org
Sat, 02 Oct 2004 13:12:11 +0000
Update of /cvsroot/po4a/po4a/testsuite
In directory haydn:/tmp/cvs-serv26775
Modified Files:
stats.sh
Log Message:
Add some comments, a usage message, and clarify the header of the table.
Index: stats.sh
===================================================================
RCS file: /cvsroot/po4a/po4a/testsuite/stats.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- stats.sh 24 Sep 2004 13:42:21 -0000 1.1
+++ stats.sh 2 Oct 2004 13:12:09 -0000 1.2
@@ -1,17 +1,40 @@
#!/bin/sh
+# see the 'check' script for the meaning of the categories.
+# You can tune the order of the categories to have all improvement in the
+# upper right or lower left corner of the table.
+types="IGN OK OK2 WOK1 WOK2 WOK3 PBS WDIFF"
+
+if [ "$#" != "2" ] ; then
+ echo "\
+Compare two executions of the 'check' script, and display the results in a
+table.
+
+Usage: $0 <directory1> <directory2>
+Were both directories contain the results (LISTE.* files) of two 'check'
+executions.
+
+The categories are configurable at the beginning of $0.
+
+$0 creates, in the stats_work directory, files named cat1_cat2, which
+indicate which man pages changed from the cat1 category to the cat2 one.
+"
+ exit 0
+fi
+
old=$1
new=$2
[ -d stats_work ] || mkdir stats_work
-types="IGN OK OK2 WOK1 WOK2 WOK3 PBS WDIFF"
-
+# copy the LISTE.* files in stats_work
for i in $types
do
sort $old/LISTE.$i > stats_work/old_$i
sort $new/LISTE.$i > stats_work/new_$i
done
+# create the cat1_cat2 files which contain the common lines of two
+# categories.
for i in $types
do
for j in $types
@@ -20,7 +43,11 @@
done
done
-echo -n " "
+# display the report
+echo "dir1:$old"
+echo "dir2:$new"
+echo
+echo -n "dir1\\dir2"
for i in $types
do
printf "% 6s" $i
@@ -28,7 +55,7 @@
echo
for i in $types
do
- printf "% 5s" $i
+ printf "% 9s" $i
for j in $types
do
printf "% 6d" $(wc -l stats_work/"$i"_"$j"|cut -d" " -f1)