slitaz-forge rev 327

mirror-search.sh: add cloud size
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Aug 21 11:53:52 2012 +0200 (2012-08-21)
parents 87d4ccc604d7
children 12e29f96b8af
files pkgs/mirror-search.sh
line diff
     1.1 --- a/pkgs/mirror-search.sh	Wed Aug 15 16:32:07 2012 +0200
     1.2 +++ b/pkgs/mirror-search.sh	Tue Aug 21 11:53:52 2012 +0200
     1.3 @@ -468,7 +468,7 @@
     1.4  font-size:$((8+($pct/10)))pt; font-weight:bold; \
     1.5  color:black; text-decoration:none">$(echo $item | sed 's/-/\&minus;/g')</a>
     1.6  EOT
     1.7 -	done
     1.8 +	done | tee /dev/stderr | printf "</p><p align=right>$2" $(wc -l)
     1.9  	echo "</p>"
    1.10  }
    1.11  
    1.12 @@ -731,7 +731,7 @@
    1.13  _EOT_
    1.14  	else
    1.15  		# Display clouds
    1.16 -		while read var arg title filter; do
    1.17 +		while read var arg title fmt filter; do
    1.18  			file=/tmp/$arg-$SLITAZ_VERSION
    1.19  			echo "<a name=\"$arg\"></a>"
    1.20  			echo "<h3>$title</h3>"
    1.21 @@ -739,11 +739,11 @@
    1.22  			  $PACKAGES_REPOSITORY/packages.txt -nt $file ] &&
    1.23  				build_cloud_cache $var "$filter" > $file.$$ &&
    1.24  				mv $file.$$ $file
    1.25 -			display_cloud $arg < $file
    1.26 +			display_cloud $arg "$fmt" < $file 2>&1
    1.27  		done << EOT
    1.28 -TAGS		tags		Tag\ cloud
    1.29 -CATEGORY	category	Category\ cloud
    1.30 -MAINTAINER	maintainer	Maintainer\ cloud	s/.*<//;s/.*\ //;s/>//
    1.31 +TAGS		tags		Tag\ cloud		%d\ tags.
    1.32 +CATEGORY	category	Category\ cloud		%d\ categories.
    1.33 +MAINTAINER	maintainer	Maintainer\ cloud	%d\ maintainers.	s/.*<//;s/.*\ //;s/>//
    1.34  EOT
    1.35  	fi
    1.36  	;;