# HG changeset patch # User Pascal Bellard # Date 1392648917 0 # Node ID 5500764333d06a10174ab45a3aa7bf043579c982 # Parent f14e1d28ce93b80e3ba6e0f8515f7e34c86122c8 pkgs: add backports diff -r f14e1d28ce93 -r 5500764333d0 pkgs/search.sh --- a/pkgs/search.sh Mon Feb 17 14:29:16 2014 +0000 +++ b/pkgs/search.sh Mon Feb 17 14:55:17 2014 +0000 @@ -148,6 +148,7 @@ version=[1-9]*) i=${i%%.*}; SLITAZ_VERSION=${i#*=}.0;; version=s*|version=4*) SLITAZ_VERSION=stable;; version=u*) SLITAZ_VERSION=undigest;; + version=b*) SLITAZ_VERSION=backports;; version=t*) SLITAZ_VERSION=tiny;; esac done @@ -181,6 +182,7 @@ 3.0) selected_3="selected";; stable) selected_stable="selected";; undigest) selected_undigest="selected";; + backports) selected_backports="selected";; esac # @@ -235,6 +237,7 @@ + @@ -254,11 +257,11 @@ { local tmp=/tmp/files.list.$(basename ${1%/packages}) if [ ! -s $tmp -o $1/files.list.lzma -nt $tmp ]; then - unlzma -c $1/files.list.lzma > $tmp.$$ && mv $tmp.$$ $tmp + unlzma < $1/files.list.lzma > $tmp.$$ && mv $tmp.$$ $tmp fi case "$2" in lines) if [ ! -s $tmp.lines -o $tmp -nt $tmp.lines ]; then - cat $tmp | wc -l > $tmp.lines.$$ && + wc -l < $tmp > $tmp.lines.$$ && mv $tmp.lines.$$ $tmp.lines fi cat $tmp.lines ;; @@ -270,7 +273,7 @@ # TODO: caching the summary for 5 minutes xhtml_footer() { PKGS=$(ls $WOK/ | wc -l) - #FILES=$(unlzma -c $filelist | wc -l) + #FILES=$(unlzma < $filelist | wc -l) . lib/footer.sh } @@ -317,7 +320,8 @@ cat << _EOT_ $PACKAGE_HREF $(installed_size $PACKAGE) - $SHORT_DESC $(gettext "Receipt") $COOKER + $SHORT_DESC + $(gettext "Receipt") $COOKER _EOT_ fi cat << EOT @@ -492,7 +496,7 @@ # Syntax highlighting for receipt file - stolen from tazpanel: # '/var/www/tazpanel/lib/libtazpanel' and developed syntax_highlighter() { - cat "$1" | sed -e "s|\&|\&|g; s|<|\<|g; s|>|\>|g; s| | |g" \ + sed -e "s|\&|\&|g; s|<|\<|g; s|>|\>|g; s| | |g" \ -e "s|@|\@|g; s|~|\~|g" \ -e "#literals" \ -e "s|'\([^']*\)'|@l\0~|g" \ @@ -539,7 +543,7 @@ -e "s|@s||g" \ -e "s|@p||g" \ -e "s|@r||g" \ - -e "s|~||g" + -e "s|~||g" < "$1" } @@ -721,8 +725,8 @@

$(eval_gettext "These packages may overload files of \$SEARCH")

 _EOT_
-		( unlzma -c $filelist | grep ^$SEARCH: ;
-		  unlzma -c $filelist | grep -v ^$SEARCH: ) | awk '
+		( unlzma < $filelist | grep ^$SEARCH: ;
+		  unlzma < $filelist | grep -v ^$SEARCH: ) | awk '
 BEGIN { pkg=""; last="x" }
 {
 	if ($2 == "") next
@@ -750,7 +754,7 @@
 
 _EOT_
 		unset last
-		unlzma -c $filelist \
+		unlzma < $filelist \
 		| grep "$SEARCH" | while read pkg file; do
 			echo "$file" | grep -q "$SEARCH" || continue
 			if [ "$last" != "${pkg%:}" ]; then
@@ -787,13 +791,13 @@
 
 _EOT_
 		unset last
-		unlzma -c $filelist \
+		unlzma < $filelist \
 		| grep ^$SEARCH: | sed 's/.*: /    /' | sort
 		cat << _EOT_
 
 _EOT_
-		filenb=$(unlzma -c $filelist | grep ^$SEARCH: | wc -l)
+		filenb=$(unlzma < $filelist | grep ^$SEARCH: | wc -l)
 		eval_ngettext "\$filenb file" "\$filenb files" $filenb
 		cat << _EOT_
   \
@@ -956,7 +960,7 @@
 $(package_entry)$DESC
 _EOT_
 		done
-		vpkgs="$(cat $equiv | cut -d= -f1 | grep $SEARCH)"
+		vpkgs="$(cut -d= -f1 < $equiv | grep $SEARCH)"
 		for vpkg in $vpkgs ; do
 			cat << _EOT_