cookutils diff web/cooker.cgi @ rev 105

web: add unbuilt package stat
author Christophe Lincoln <pankso@slitaz.org>
date Mon May 09 00:51:40 2011 +0200 (2011-05-09)
parents d30efd55aa46
children b5dc1fba0894
line diff
     1.1 --- a/web/cooker.cgi	Sun May 08 18:50:20 2011 +0200
     1.2 +++ b/web/cooker.cgi	Mon May 09 00:51:40 2011 +0200
     1.3 @@ -169,8 +169,9 @@
     1.4  		fi ;;
     1.5  	*)
     1.6  		# Main page with summary.
     1.7 +		inwok=$(ls $WOK | wc -l)
     1.8  		cooked=$(ls $PKGS/*.tazpkg | wc -l)
     1.9 -		inwok=$(ls $WOK | wc -l)
    1.10 +		unbuilt=$(($cooked - $inwok))
    1.11  		[ "$cooked" -gt 0 ] && div=$(($inwok / 100))
    1.12  		[ "$cooked" -gt 0 ] && pct=$(($cooked / $div))
    1.13  		[ "$cooked" == 0 ] && pct=0
    1.14 @@ -195,7 +196,7 @@
    1.15  </pre>
    1.16  
    1.17  <p>
    1.18 -	Packages: $cooked cooked on $inwok in the wok.
    1.19 +	Packages: $inwok in the wok - $cooked cooked - $unbuilt unbuilt
    1.20  </p>
    1.21  <div class="pctbar">
    1.22  	<div class="pct" style="width: ${pct}%;">${pct}%</div>