# HG changeset patch # User Christophe Lincoln # Date 1306587617 -7200 # Node ID b8d3c7050b6357183e8cd83e537858df83357ca6 # Parent e35efad312d1a767121705edc75ac79406fb56f4 cooker: add Pascal patch to cgi web so it display better pct and TZ diff -r e35efad312d1 -r b8d3c7050b63 web/cooker.cgi --- a/web/cooker.cgi Sat May 28 00:41:01 2011 +0200 +++ b/web/cooker.cgi Sat May 28 15:00:17 2011 +0200 @@ -189,10 +189,8 @@ inwok=$(ls $WOK | wc -l) cooked=$(ls $PKGS/*.tazpkg | wc -l) unbuilt=$(($inwok - $cooked)) - [ "$cooked" -gt 0 ] && div=$(($inwok / 100)) - [ "$div" -gt 0 ] && pct=$(($cooked / $div)) - [ "$div" == 0 ] && pct=0 - [ "$div" == "" ] && pct=0 + pct=0 + [ $inwok -gt 0 ] && pct=$(( ($cooked * 100) / $inwok )) cat << EOT
@@ -213,7 +211,7 @@

- Packages: $inwok in the wok - $cooked cooked - $unbuilt unbuilt + $(date '+%Y-%M-%d %H:%M') Packages: $inwok in the wok - $cooked cooked - $unbuilt unbuilt

${pct}%