slitaz-forge diff pkgs/mirror-search.sh @ rev 536
Improve R-Pi main page
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu May 01 04:15:25 2014 +0200 (2014-05-01) |
parents | 9068ce96fee4 |
children | 7442bb8579e9 |
line diff
1.1 --- a/pkgs/mirror-search.sh Mon Jan 13 15:41:35 2014 +0000 1.2 +++ b/pkgs/mirror-search.sh Thu May 01 04:15:25 2014 +0200 1.3 @@ -241,11 +241,11 @@ 1.4 { 1.5 local tmp=/tmp/files.list.$(basename ${1%/packages}) 1.6 if [ ! -s $tmp -o $1/files.list.lzma -nt $tmp ]; then 1.7 - unlzma -c $1/files.list.lzma > $tmp.$$ && mv $tmp.$$ $tmp 1.8 + unlzma < $1/files.list.lzma > $tmp.$$ && mv $tmp.$$ $tmp 1.9 fi 1.10 case "$2" in 1.11 lines) if [ ! -s $tmp.lines -o $tmp -nt $tmp.lines ]; then 1.12 - cat $tmp | wc -l > $tmp.lines.$$ && 1.13 + wc -l < $tmp > $tmp.lines.$$ && 1.14 mv $tmp.lines.$$ $tmp.lines 1.15 fi 1.16 cat $tmp.lines ;; 1.17 @@ -293,9 +293,12 @@ 1.18 PACKAGE_URL="http://mirror.slitaz.org/packages/$SLITAZ_VERSION/$(cd /var/www/slitaz/mirror/packages/$SLITAZ_VERSION ; ls $PACKAGE-$VERSION*.tazpkg)" 1.19 busybox wget -s $PACKAGE_URL 2> /dev/null && 1.20 PACKAGE_HREF="<a href=\"$PACKAGE_URL\">$PACKAGE</a>" 1.21 - COOKER="" 1.22 - [ "$SLITAZ_VERSION" == "cooking" ] && 1.23 - COOKER="<a href=\"http://cook.slitaz.org/cooker.cgi?pkg=$PACKAGE\">$(gettext "Cooker")</a>" 1.24 + case "$SLITAZ_VERSION" in 1.25 + cooking) COOKER="<a href=\"http://cook.slitaz.org/cooker.cgi?pkg=$PACKAGE\">$(gettext "Cooker")</a>";; 1.26 + undigest) COOKER="<a href=\"http://cook.slitaz.org/undigest/cooker.cgi?pkg=$PACKAGE\">$(gettext "Cooker")</a>";; 1.27 + backports) COOKER="<a href=\"http://cook.slitaz.org/backports/cooker.cgi?pkg=$PACKAGE\">$(gettext "Cooker")</a>";; 1.28 + *) COOKER="";; 1.29 + esac 1.30 cat << _EOT_ 1.31 $PACKAGE_HREF $(installed_size $PACKAGE): $SHORT_DESC \ 1.32 <a href="?receipt=$PACKAGE&version=$SLITAZ_VERSION">$(gettext "Receipt")</a> $COOKER 1.33 @@ -909,7 +912,7 @@ 1.34 _EOT_ 1.35 done 1.36 equiv=$PACKAGES_REPOSITORY/packages.equiv 1.37 - vpkgs="$(cat $equiv | cut -d= -f1 | grep $SEARCH)" 1.38 + vpkgs="$(cut -d= -f1 < $equiv | grep $SEARCH)" 1.39 for vpkg in $vpkgs ; do 1.40 cat << _EOT_ 1.41 </pre>