slitaz-forge rev 645

search.sh: clouds cache (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 12 12:38:04 2017 +0100 (2017-02-12)
parents acdd1536ea51
children 9f35be822910
files pkgs/search.sh
line diff
     1.1 --- a/pkgs/search.sh	Sun Feb 12 12:01:51 2017 +0100
     1.2 +++ b/pkgs/search.sh	Sun Feb 12 12:38:04 2017 +0100
     1.3 @@ -891,8 +891,9 @@
     1.4  
     1.5  display_cloud() {
     1.6  	arg=$1
     1.7 -	[ /tmp/cloud-$arg-$SLITAZ_VERSION -nt $pkglist ] &&
     1.8 -	cat /tmp/cloud-$arg-$SLITAZ_VERSION ||
     1.9 +	[ -d /tmp/cloud ] || mkdir -p /tmp/cloud
    1.10 +	[ /tmp/cloud/$arg-$SLITAZ_VERSION -nt $pkglist ] &&
    1.11 +	cat /tmp/cloud/$arg-$SLITAZ_VERSION ||
    1.12  	find $WOK/ -maxdepth 2 -name receipt -exec sed \
    1.13  	 "/^$1=/!d;s/.*['\"<]\\(..*\\)[>\"'].*/\\1/" {} \; | awk '
    1.14  {
    1.15 @@ -933,7 +934,7 @@
    1.16  			TAGS)       _p '%s tag'          '%s tags'          "$count" "$count";;
    1.17  		esac
    1.18  		echo '</p>'
    1.19 -	} | tee /tmp/cloud-$arg-$SLITAZ_VERSION
    1.20 +	} | tee /tmp/cloud/$arg-$SLITAZ_VERSION
    1.21  }
    1.22  
    1.23