From b927b5f3020918b574474b5fd80969fad023a837 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 28 Feb 2011 22:09:20 +0100 Subject: [PATCH] pkg-stats: add statistics about number of patches per package Signed-off-by: Thomas Petazzoni --- scripts/pkg-stats | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/scripts/pkg-stats b/scripts/pkg-stats index 9607da2bde..7bb292830b 100755 --- a/scripts/pkg-stats +++ b/scripts/pkg-stats @@ -51,6 +51,7 @@ tr.correct td { Id Package +Patch count AUTOTARGETS GENTARGETS CMAKETARGETS @@ -71,6 +72,7 @@ tr.correct td { convert_to_generic_target=0 convert_to_generic_host=0 convert_to_autotools=0 +total_patch_count=0 cnt=1 for i in $(find package/ -name '*.mk') ; do @@ -163,6 +165,22 @@ for i in $(find package/ -name '*.mk') ; do echo "$cnt" echo "$i" + package_dir=$(dirname $i) + patch_count=$(find ${package_dir} -name '*.patch' | wc -l) + total_patch_count=$(($total_patch_count+$patch_count)) + + if test $patch_count -lt 1 ; then + patch_count_color="#00ff00" + elif test $patch_count -lt 5 ; then + patch_count_color="#ffc600" + else + patch_count_color="#ff0000" + fi + + echo "" + echo $patch_count + echo "" + echo "" if [ $is_auto_host -eq 1 ] ; then echo "YES" @@ -256,6 +274,10 @@ echo "Packages to convert to host autotools" echo "$convert_to_host_autotools" echo "" echo "" +echo "Number of patches in all packages" +echo "$total_patch_count" +echo "" +echo "" echo "TOTAL" echo "$cnt" echo "" -- 2.30.2