cookutils rev 27

improve doc and small fix
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 06 04:46:36 2011 +0200 (2011-05-06)
parents 93bb4bfc8c26
children 747a392fb6f7
files cook cooker doc/cookutils.en.html
line diff
     1.1 --- a/cook	Fri May 06 04:07:11 2011 +0200
     1.2 +++ b/cook	Fri May 06 04:46:36 2011 +0200
     1.3 @@ -65,7 +65,7 @@
     1.4  
     1.5  # Log activities, we want first letter capitalized.
     1.6  log() {
     1.7 -	grep ^[a-zA-Z0-9] | \
     1.8 +	grep ^[A-Z] | \
     1.9  		sed s"#^[A-Z]\([^']*\)#$(date '+%Y-%m-%d %H:%M') : \0#" >> $activity
    1.10  }
    1.11  
     2.1 --- a/cooker	Fri May 06 04:07:11 2011 +0200
     2.2 +++ b/cooker	Fri May 06 04:46:36 2011 +0200
     2.3 @@ -57,7 +57,7 @@
     2.4  
     2.5  # Log activities, we want first letter capitalized.
     2.6  log() {
     2.7 -	grep ^[a-zA-Z0-9] | \
     2.8 +	grep ^[A-Z] | \
     2.9  		sed s"#^[A-Z]\([^']*\)#$(date '+%Y-%m-%d %H:%M') : \0#" >> $activity
    2.10  }
    2.11  
    2.12 @@ -73,7 +73,7 @@
    2.13  }
    2.14  
    2.15  # Clean up after cook sucess.
    2.16 -emty_command() {
    2.17 +empty_command() {
    2.18  	rm -f $command && touch $command
    2.19  }
    2.20  
    2.21 @@ -311,8 +311,7 @@
    2.22  		strip_blocked
    2.23  		echo "Packages to cook: $(cat $cooklist | wc -l)" | log
    2.24  		cook_order | tee $LOGS/cookorder.log
    2.25 -		cook_list
    2.26 -		emty_command ;;
    2.27 +		cook_list && empty_command;;
    2.28  	*)
    2.29  		# Default is to cook all commits.
    2.30  		[ "$1" ] && usage
    2.31 @@ -344,7 +343,7 @@
    2.32  		else
    2.33  			echo "No revision changes: $cur vs $new" | log
    2.34  			separator | log_commits
    2.35 -			emty_command && echo "" && exit 0
    2.36 +			empty_command && echo "" && exit 0
    2.37  		fi
    2.38  		
    2.39  		# Get modifications
    2.40 @@ -369,8 +368,7 @@
    2.41  		separator && echo "" | log_commits
    2.42  		strip_blocked
    2.43  		cook_order | tee $LOGS/cookorder.log
    2.44 -		cook_commits
    2.45 -		emty_command ;;
    2.46 +		cook_commits && empty_command ;;
    2.47  esac
    2.48  
    2.49  exit 0
     3.1 --- a/doc/cookutils.en.html	Fri May 06 04:07:11 2011 +0200
     3.2 +++ b/doc/cookutils.en.html	Fri May 06 04:46:36 2011 +0200
     3.3 @@ -29,16 +29,32 @@
     3.4  	who let you view cook logs in a nice and colored way.
     3.5  </p>
     3.6  
     3.7 +<h3>Cook usage</h3>
     3.8 +<p>
     3.9 +	Cook provide a small built-in help usage that you can display with
    3.10 +	the command:
    3.11 +</p>
    3.12 +<pre>
    3.13 +# cook usage
    3.14 +</pre>
    3.15 +
    3.16  <h3>Howto work</h3>
    3.17  <p>
    3.18  	The first thing you will have to do before building packages is to setup
    3.19  	your environment. These 2 recommended way to work: cook directly on host
    3.20  	or cook in chroot to protect your host. In the case you want to work in a
    3.21 -	chroot you can use Tazdev to create one and chroot in it: 
    3.22 +	chroot you can install and use Tazdev to create one and chroot in it: 
    3.23  </p>
    3.24  <pre>
    3.25  # tazdev gen-chroot &amp;&amp; tazdev chroot
    3.26  </pre>
    3.27 +<p>
    3.28 +	By default Tazdev create a chrrot in /home/slitaz/cooking/chroot but you
    3.29 +	can specify a custome path in argument. The chroot place is not important,
    3.30 +	when you will be in the chroot you will use standard SliTaz path such as
    3.31 +	/home/slitaz/wok for the wok directory or /home/slitaz/log for all the cook
    3.32 +	logs. As usual you can diplay tazdev help usage with: tazdev usage
    3.33 +</p>
    3.34  
    3.35  <h3>Getting started</h3>
    3.36  <p>
    3.37 @@ -52,6 +68,15 @@
    3.38  <pre>
    3.39  # cook setup
    3.40  </pre>
    3.41 +<p>
    3.42 +	The setup command have a --wok option who let you clone SliTaz wok while
    3.43 +	setting up your cook environment. Even if you not yet an official developers
    3.44 +	you can	clone it and use existing packages as example to create your own.
    3.45 +	To setup and clone the wok:
    3.46 +</p>
    3.47 +<pre>
    3.48 +# cook setup --wok
    3.49 +</pre>
    3.50  
    3.51  <h3>Test your environment</h3>
    3.52  <p>
    3.53 @@ -134,6 +159,13 @@
    3.54  	default on any SliTaz system since we provide CGI support via Busybox httpd
    3.55  	web server.
    3.56  </p>
    3.57 +<p>
    3.58 +	The Cooker provide a small built-in help usage that you can display with
    3.59 +	the command:
    3.60 +</p>
    3.61 +<pre>
    3.62 +# cooker --usage
    3.63 +</pre>
    3.64  
    3.65  <h3>Cooker setup</h3>
    3.66  <p>
    3.67 @@ -186,10 +218,10 @@
    3.68  <h3>Cooker CGI/Web</h3>
    3.69  <p>
    3.70  	To let you view log files in a nice way, keep activity trace and help find
    3.71 -	errors, you can use the Cooker Web interface located by default in
    3.72 -	/var/www/cooker. If you dont use a chroot and the Busybox httpd web server
    3.73 -	is running, the web interface will work without modifiaction and should be
    3.74 -	reachable at: <a href="http://localhost/cgi-bin/cooker/cooker.cgi">
    3.75 +	errors, you can use the Cooker Web interface located by default in the folder
    3.76 +	/var/www/cgi-bin/cooker. If you dont use a chroot and the Busybox httpd
    3.77 +	web server is running, the web interface will work without configuration and
    3.78 +	should be reachable at: <a href="http://localhost/cgi-bin/cooker/cooker.cgi">
    3.79  		http://localhost/cgi-bin/cooker/cooker.cgi</a> 
    3.80  </p>
    3.81  <p>
    3.82 @@ -201,7 +233,7 @@
    3.83  /home/slitaz/cooking/chroot
    3.84  </pre>
    3.85  <p>
    3.86 -With /etc/slitaz/cook.conf modified as bellow:
    3.87 +	With /etc/slitaz/cook.conf modified as bellow:
    3.88  </p>
    3.89  <pre>
    3.90  SLITAZ="/home/slitaz/cooking/chroot/home/slitaz"
    3.91 @@ -209,15 +241,17 @@
    3.92  <p>
    3.93  	Note: It's not obligatory to install the cookutils on your host to use the
    3.94  	web interface, you can also copy the cooker.cgi and style.css files for
    3.95 -	example in your ~/Public directory and use a custom cook.conf with it. Say
    3.96 -	you have cloned or downloaded the cookutils:
    3.97 +	example in your ~/Public directory and use a custom cook.conf with it. The
    3.98 +	advantage of installing cookutils on the host is to get regular update via
    3.99 +	Tazpkg packages manager. Say you have cloned or downloaded the cookutils:
   3.100  </p>
   3.101  <pre>
   3.102 -$ cp cookutils/web ~/Public/cgi-bin/cooker
   3.103 -$ cp cookutils/cook.conf ~/Public/cgi-bin/cooker
   3.104 +$ cp -a cookutils/web ~/Public/cgi-bin/cooker
   3.105 +$ cp -f cookutils/cook.conf ~/Public/cgi-bin/cooker
   3.106  </pre>
   3.107  <p>
   3.108 -Edit ~/Public/cgi-bin/cooker/cook.conf and you all done!
   3.109 +	Edit the configuration file: ~/Public/cgi-bin/cooker/cook.conf to set
   3.110 +	SLITAZ path and you all done!
   3.111  </p>
   3.112  
   3.113  <h3>Cooknotes</h3>