# HG changeset patch # User Christophe Lincoln # Date 1304649996 -7200 # Node ID 107f17f1613362495f368a1d5ded4341f364d1ea # Parent 93bb4bfc8c265cc19ca5048e6a1699f655761c97 improve doc and small fix diff -r 93bb4bfc8c26 -r 107f17f16133 cook --- a/cook Fri May 06 04:07:11 2011 +0200 +++ b/cook Fri May 06 04:46:36 2011 +0200 @@ -65,7 +65,7 @@ # Log activities, we want first letter capitalized. log() { - grep ^[a-zA-Z0-9] | \ + grep ^[A-Z] | \ sed s"#^[A-Z]\([^']*\)#$(date '+%Y-%m-%d %H:%M') : \0#" >> $activity } diff -r 93bb4bfc8c26 -r 107f17f16133 cooker --- a/cooker Fri May 06 04:07:11 2011 +0200 +++ b/cooker Fri May 06 04:46:36 2011 +0200 @@ -57,7 +57,7 @@ # Log activities, we want first letter capitalized. log() { - grep ^[a-zA-Z0-9] | \ + grep ^[A-Z] | \ sed s"#^[A-Z]\([^']*\)#$(date '+%Y-%m-%d %H:%M') : \0#" >> $activity } @@ -73,7 +73,7 @@ } # Clean up after cook sucess. -emty_command() { +empty_command() { rm -f $command && touch $command } @@ -311,8 +311,7 @@ strip_blocked echo "Packages to cook: $(cat $cooklist | wc -l)" | log cook_order | tee $LOGS/cookorder.log - cook_list - emty_command ;; + cook_list && empty_command;; *) # Default is to cook all commits. [ "$1" ] && usage @@ -344,7 +343,7 @@ else echo "No revision changes: $cur vs $new" | log separator | log_commits - emty_command && echo "" && exit 0 + empty_command && echo "" && exit 0 fi # Get modifications @@ -369,8 +368,7 @@ separator && echo "" | log_commits strip_blocked cook_order | tee $LOGS/cookorder.log - cook_commits - emty_command ;; + cook_commits && empty_command ;; esac exit 0 diff -r 93bb4bfc8c26 -r 107f17f16133 doc/cookutils.en.html --- a/doc/cookutils.en.html Fri May 06 04:07:11 2011 +0200 +++ b/doc/cookutils.en.html Fri May 06 04:46:36 2011 +0200 @@ -29,16 +29,32 @@ who let you view cook logs in a nice and colored way.

+

Cook usage

+

+ Cook provide a small built-in help usage that you can display with + the command: +

+
+# cook usage
+
+

Howto work

The first thing you will have to do before building packages is to setup your environment. These 2 recommended way to work: cook directly on host or cook in chroot to protect your host. In the case you want to work in a - chroot you can use Tazdev to create one and chroot in it: + chroot you can install and use Tazdev to create one and chroot in it:

 # tazdev gen-chroot && tazdev chroot
 
+

+ By default Tazdev create a chrrot in /home/slitaz/cooking/chroot but you + can specify a custome path in argument. The chroot place is not important, + when you will be in the chroot you will use standard SliTaz path such as + /home/slitaz/wok for the wok directory or /home/slitaz/log for all the cook + logs. As usual you can diplay tazdev help usage with: tazdev usage +

Getting started

@@ -52,6 +68,15 @@

 # cook setup
 
+

+ The setup command have a --wok option who let you clone SliTaz wok while + setting up your cook environment. Even if you not yet an official developers + you can clone it and use existing packages as example to create your own. + To setup and clone the wok: +

+
+# cook setup --wok
+

Test your environment

@@ -134,6 +159,13 @@ default on any SliTaz system since we provide CGI support via Busybox httpd web server.

+

+ The Cooker provide a small built-in help usage that you can display with + the command: +

+
+# cooker --usage
+

Cooker setup

@@ -186,10 +218,10 @@

Cooker CGI/Web

To let you view log files in a nice way, keep activity trace and help find - errors, you can use the Cooker Web interface located by default in - /var/www/cooker. If you dont use a chroot and the Busybox httpd web server - is running, the web interface will work without modifiaction and should be - reachable at: + errors, you can use the Cooker Web interface located by default in the folder + /var/www/cgi-bin/cooker. If you dont use a chroot and the Busybox httpd + web server is running, the web interface will work without configuration and + should be reachable at: http://localhost/cgi-bin/cooker/cooker.cgi

@@ -201,7 +233,7 @@ /home/slitaz/cooking/chroot

-With /etc/slitaz/cook.conf modified as bellow: + With /etc/slitaz/cook.conf modified as bellow:

 SLITAZ="/home/slitaz/cooking/chroot/home/slitaz"
@@ -209,15 +241,17 @@
 

Note: It's not obligatory to install the cookutils on your host to use the web interface, you can also copy the cooker.cgi and style.css files for - example in your ~/Public directory and use a custom cook.conf with it. Say - you have cloned or downloaded the cookutils: + example in your ~/Public directory and use a custom cook.conf with it. The + advantage of installing cookutils on the host is to get regular update via + Tazpkg packages manager. Say you have cloned or downloaded the cookutils:

-$ cp cookutils/web ~/Public/cgi-bin/cooker
-$ cp cookutils/cook.conf ~/Public/cgi-bin/cooker
+$ cp -a cookutils/web ~/Public/cgi-bin/cooker
+$ cp -f cookutils/cook.conf ~/Public/cgi-bin/cooker
 

-Edit ~/Public/cgi-bin/cooker/cook.conf and you all done! + Edit the configuration file: ~/Public/cgi-bin/cooker/cook.conf to set + SLITAZ path and you all done!

Cooknotes