From f978f2249d2c420a3e4eb5bd804ca524380f1ae2 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 26 Jul 2010 15:15:14 +0200 Subject: Improvements to the package conversion status script Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- scripts/pkg-stats | 119 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 42 deletions(-) (limited to 'scripts') diff --git a/scripts/pkg-stats b/scripts/pkg-stats index 1174ef04c..01af89de0 100755 --- a/scripts/pkg-stats +++ b/scripts/pkg-stats @@ -36,6 +36,12 @@ td { td.centered { text-align: center; } +tr.wrong td { + background: #ff9a69; +} +tr.correct td { + background: #d2ffc4; +} @@ -78,12 +84,7 @@ for i in $(find package/ -name '*.mk') ; do continue fi - found=0 - - echo "" - echo "$cnt" cnt=$((cnt+1)) - echo "$i" is_auto_host=0 is_auto_target=0 @@ -92,18 +93,74 @@ for i in $(find package/ -name '*.mk') ; do is_manual_target=0 is_manual_host=0 - echo "" if grep -E "\(call AUTOTARGETS,[^,]*,[^,]*,host\)" $i > /dev/null ; then is_auto_host=1 + fi + + if grep -E "\(call AUTOTARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then + is_auto_target=1 + fi + + if grep -E "\(call GENTARGETS,[^,]*,[^,]*,host\)" $i > /dev/null ; then + is_pkg_host=1 + fi + + if grep -E "\(call GENTARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then + is_pkg_target=1 + fi + + pkg=$(basename $i) + pkg=${pkg%.mk} + + if grep "^host-$pkg:" $i > /dev/null ; then + is_manual_host=1 + fi + + if test $is_pkg_target -eq 0 -a $is_auto_target -eq 0 ; then + is_manual_target=1 + fi + + tasks="" + + if [ $is_manual_target -eq 1 ] ; then + if grep "/configure" $i > /dev/null ; then + tasks=$tasks"
  • convert package to autotools ?
  • " + convert_to_target_autotools=$((convert_to_target_autotools+1)) + else + tasks=$tasks"
  • convert to generic target
  • " + convert_to_generic_target=$((convert_to_generic_target+1)) + fi + fi + + if [ $is_manual_host -eq 1 ]; then + if grep "/configure" $i > /dev/null ; then + tasks=$tasks"
  • convert package to autotools ?
  • " + convert_to_host_autotools=$((convert_to_host_autotools+1)) + else + tasks=$tasks"
  • convert to generic host
  • " + convert_to_generic_host=$((convert_to_generic_host+1)) + fi + fi + + if test -n "$tasks" ; then + echo "" + else + echo "" + fi + + echo "$cnt" + echo "$i" + + echo "" + if [ $is_auto_host -eq 1 ] ; then echo "YES" else echo "NO" fi + echo "" echo "" - if grep -E "\(call AUTOTARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then - found=1 - is_auto_target=1 + if [ $is_auto_target -eq 1 ] ; then echo "YES" else echo "NO" @@ -111,9 +168,7 @@ for i in $(find package/ -name '*.mk') ; do echo "" echo "" - if grep -E "\(call GENTARGETS,[^,]*,[^,]*,host\)" $i > /dev/null ; then - found=1 - is_pkg_host=1 + if [ $is_pkg_host -eq 1 ] ; then echo "YES" else echo "NO" @@ -121,22 +176,15 @@ for i in $(find package/ -name '*.mk') ; do echo "" echo "" - if grep -E "\(call GENTARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then - found=1 - is_pkg_target=1 + if [ $is_pkg_target -eq 1 ] ; then echo "YES" else echo "NO" fi echo "" - pkg=$(basename $i) - pkg=${pkg%.mk} - echo "" - if grep "^host-$pkg:" $i > /dev/null ; then - found=1 - is_manual_host=1 + if [ $is_manual_host -eq 1 ] ; then echo "YES" else echo "NO" @@ -144,9 +192,7 @@ for i in $(find package/ -name '*.mk') ; do echo "" echo "" - if test $is_pkg_target -eq 0 -a $is_auto_target -eq 0 ; then - found=1 - is_manual_target=1 + if [ $is_manual_target -eq 1 ] ; then echo "YES" else echo "NO" @@ -155,22 +201,7 @@ for i in $(find package/ -name '*.mk') ; do echo "" echo "
      " - if grep "/configure" $i > /dev/null ; then - echo "
    • convert package to autotools ?
    • " - convert_to_autotools=$((convert_to_autotools+1)) - else - if [ $is_manual_target -eq 1 ]; then - echo "
    • convert to generic target
    • " - convert_to_generic_target=$((convert_to_generic_target+1)) - fi - if [ $is_manual_host -eq 1 ]; then - echo "
    • convert to generic host
    • " - convert_to_generic_host=$((convert_to_generic_host+1)) - fi - fi - if [ $found -eq 0 ] ; then - echo "
    • look manually
    • " - fi + echo $tasks echo "
    " echo "" @@ -189,8 +220,12 @@ echo "Packages to convert to generic host" echo "$convert_to_generic_host" echo "" echo "" -echo "Packages to convert to autotools" -echo "$convert_to_autotools" +echo "Packages to convert to target autotools" +echo "$convert_to_target_autotools" +echo "" +echo "" +echo "Packages to convert to host autotools" +echo "$convert_to_host_autotools" echo "" echo "" echo "TOTAL" -- cgit v1.2.3