cookutils rev 12

cooker: Add option --pkg= so cooker can be used the same way as cook
author Christophe Lincoln <pankso@slitaz.org>
date Wed May 04 23:36:02 2011 +0200 (2011-05-04)
parents 92e7565b2519
children fa9a36a8c1f4
files cooker
line diff
     1.1 --- a/cooker	Wed May 04 23:23:51 2011 +0200
     1.2 +++ b/cooker	Wed May 04 23:36:02 2011 +0200
     1.3 @@ -32,10 +32,11 @@
     1.4  Usage: cooker [--option]
     1.5  
     1.6  Options:
     1.7 -  --usage      Display this short usage.
     1.8 -  --setup      Setup the Cooker environment.
     1.9 -  --all        Cook all unbuilt packages.
    1.10 -  --cat=       Cook all package of a category.
    1.11 +  --usage        Display this short usage.
    1.12 +  --setup        Setup the Cooker environment.
    1.13 +  --pkg=         Same as 'cook pkg' but with cooker log.
    1.14 +  --cat=         Cook all package of a category.
    1.15 +  --all          Find and cook all unbuilt packages.
    1.16  
    1.17  EOT
    1.18  	exit 0
    1.19 @@ -205,6 +206,11 @@
    1.20  				echo "TODO: $rev"
    1.21  			fi
    1.22  		done ;;
    1.23 +	--pkg=*)
    1.24 +		# Same as 'cook pkg' but with log for web interface.
    1.25 +		pkg=${1#--pkg=}
    1.26 +		echo "cook started for: <a href='cooker.cgi?log=$pkg'>$pkg</a>" | log
    1.27 +		cook $pkg || broken ;;
    1.28  	--cat=*)
    1.29  		# Cook all packages of a category.
    1.30  		rm -f $cooklist && touch $cooklist