tazwok diff tazwok @ rev 297

Fix function sort-cooklist
author Antoine Bodin <gokhlayeh@slitaz.org>
date Wed Feb 16 22:47:46 2011 +0100 (2011-02-16)
parents 0be409eb6303
children ab8d1ae60be8
line diff
     1.1 --- a/tazwok	Wed Feb 16 15:30:04 2011 +0100
     1.2 +++ b/tazwok	Wed Feb 16 22:47:46 2011 +0100
     1.3 @@ -1843,7 +1843,7 @@
     1.4  	for PACKAGE in $(cat $tmp/cooklist); do
     1.5  		WANTED="$(look_for_wanted)"
     1.6  		[ "$WANTED" ] || continue
     1.7 -		if grep -q ^$WANTED$ $PACKAGES_REPOSITORY/broken $tmp/cooklist; then		
     1.8 +		if grep -q ^$WANTED$ $PACKAGES_REPOSITORY/broken $tmp/cooklist; then
     1.9  			sed "/^$PACKAGE$/d" -i $tmp/cooklist
    1.10  		elif [ ! -d $WOK/$WANTED/install ]; then
    1.11  			sed "/^$PACKAGE$/d" -i $tmp/cooklist
    1.12 @@ -2546,16 +2546,19 @@
    1.13  		cook
    1.14  	;;
    1.15  	sort-cooklist)
    1.16 -		if [ ! "$LIST" ]; then
    1.17 -			echo "Usage : tazwok sort-cooklist cooklist" >&2\
    1.18 +		if [ ! -f "$LIST" ]; then
    1.19 +			echo "Usage : tazwok sort-cooklist cooklist" >&2
    1.20  			exit 1
    1.21  		fi
    1.22 +		check_root
    1.23  		get_tazwok_config
    1.24 -		source_lib report
    1.25 -		report start
    1.26 +		report(){ : ; }
    1.27 +		# When using sort-cooklist, the script should behave as for gen-cooklist
    1.28 +		# The only difference between theses two is where the output is sended.
    1.29 +		COMMAND=gen-cooklist
    1.30  		cooklist=$LIST
    1.31 -		sort_cooklist
    1.32 -		cp -af $tmp/cooklist $cooklist
    1.33 +		gen_cook_list
    1.34 +		cp -af $tmp/cooklist > $cooklist
    1.35  	;;
    1.36  	cook-list)
    1.37  		# Cook all packages listed in a file or in default cooklist.