cookutils diff cooker @ rev 13

cooker: more log and better (again)
author Christophe Lincoln <pankso@slitaz.org>
date Thu May 05 00:06:01 2011 +0200 (2011-05-05)
parents 97ff63251957
children 01dfc1ed1e0e
line diff
     1.1 --- a/cooker	Wed May 04 23:36:02 2011 +0200
     1.2 +++ b/cooker	Thu May 05 00:06:01 2011 +0200
     1.3 @@ -50,7 +50,7 @@
     1.4  [ -s "$activity" ] && tail -n 20 $activity > /tmp/tail && \
     1.5  	mv -f /tmp/tail $activity
     1.6  
     1.7 -# Log activities.
     1.8 +# Log activities, we want first letter capitalized.
     1.9  log() {
    1.10  	grep ^[a-zA-Z0-9] | \
    1.11  		sed s"#^[A-Z]\([^']*\)#$(date '+%Y-%m-%d %H:%M') : \0#" >> $activity
    1.12 @@ -155,7 +155,7 @@
    1.13  	if [ -s "$commits" ]; then
    1.14  		for pkg in $(cat $commits)
    1.15  		do
    1.16 -			echo "cook started for: <a href='cooker.cgi?log=$pkg'>$pkg</a>" | log
    1.17 +			echo "Cook started for: <a href='cooker.cgi?log=$pkg'>$pkg</a>" | log
    1.18  			echo "cook:$pkg" > $status
    1.19  			cook $pkg || broken
    1.20  			sed -i /^${pkg}$/d $commits
    1.21 @@ -172,7 +172,7 @@
    1.22  	--setup)
    1.23  		# Setup the Cooker environment.
    1.24  		echo -e "\nSetting up the Cooker"
    1.25 -		echo "cooker --setup: $SLITAZ" | log
    1.26 +		echo "Cooker --setup using: $SLITAZ" | log
    1.27  		separator
    1.28  		for pkg in mercurial rsync slitaz-toolchain
    1.29  		do
    1.30 @@ -209,7 +209,7 @@
    1.31  	--pkg=*)
    1.32  		# Same as 'cook pkg' but with log for web interface.
    1.33  		pkg=${1#--pkg=}
    1.34 -		echo "cook started for: <a href='cooker.cgi?log=$pkg'>$pkg</a>" | log
    1.35 +		echo "Cook started for: <a href='cooker.cgi?log=$pkg'>$pkg</a>" | log
    1.36  		cook $pkg || broken ;;
    1.37  	--cat=*)
    1.38  		# Cook all packages of a category.
    1.39 @@ -223,7 +223,7 @@
    1.40  		cook_order | tee $LOGS/cooker-order.log
    1.41  		for pkg in $(cat $cooklist)
    1.42  		do
    1.43 -			echo "cook started for: <a href='cooker.cgi?log=$pkg'>$pkg</a>" | log
    1.44 +			echo "Cook started for: <a href='cooker.cgi?log=$pkg'>$pkg</a>" | log
    1.45  			cook $pkg || broken
    1.46  		done
    1.47  		;;
    1.48 @@ -251,6 +251,7 @@
    1.49  		done && sed -i /^$/d $cooklist
    1.50  
    1.51  		echo "Packages to cook: $(cat $cooklist | wc -l)"
    1.52 +		echo "Packages to cook: $(cat $cooklist | wc -l)" | log
    1.53  		cook_order | tee $LOGS/cooker-order.log
    1.54  
    1.55  		# Clean DB files
    1.56 @@ -269,7 +270,7 @@
    1.57  		# Get revisions.
    1.58  		cd $wok || ( echo "" && exit 1 )
    1.59  		cur=$(hg head --template '{rev}\n')
    1.60 -		echo "Updating Hg wok" | log
    1.61 +		echo "Updating Hg wok: ${wok}-hg" | log
    1.62  		echo "hg:pull" > $status
    1.63  		cd ${wok}-hg && hg pull -u
    1.64  		new=$(hg head --template '{rev}\n')
    1.65 @@ -284,7 +285,7 @@
    1.66  			cp -a ${wok}-hg/* $wok
    1.67  			cp -a ${wok}-hg/.hg $wok
    1.68  		else
    1.69 -			echo "No changes: $cur vs $new" | log
    1.70 +			echo "No revision changes: $cur vs $new" | log
    1.71  			separator && echo "" && exit 0
    1.72  		fi
    1.73