cookutils rev 39

cook: Add option --getsrc (Thanks Christopher)
author Christophe Lincoln <pankso@slitaz.org>
date Sat May 07 01:44:24 2011 +0200 (2011-05-07)
parents a491bec2d20a
children 12fe3e17e20a
files cook doc/cookutils.en.html
line diff
     1.1 --- a/cook	Fri May 06 23:41:09 2011 +0100
     1.2 +++ b/cook	Sat May 07 01:44:24 2011 +0200
     1.3 @@ -37,7 +37,8 @@
     1.4  
     1.5  $(echo -e "\033[1m$(gettext "Options:")\033[0m")
     1.6    --clean|-c      Cook : $(gettext "clean the package in the wok.")
     1.7 -  --install|-i    Cook : $(gettext "and install the package.")
     1.8 +  --install|-i    Cook : $(gettext "cook and install the package.")
     1.9 +  --getsrc|-gs    Cook : $(gettext "get the package source tarball.")
    1.10    --wok|-w        Setup: $(gettext "create also a wok from Hg repo.")
    1.11  
    1.12  EOT
    1.13 @@ -651,6 +652,11 @@
    1.14  				status && echo "" && exit 0 ;;
    1.15  			--install|-i)
    1.16  				inst='yes' ;;
    1.17 +			--getsrc)
    1.18 +				echo "Getting source for: $pkg"
    1.19 +				separator
    1.20 +				. $WOK/$pkg/receipt && get_source
    1.21 +				echo -e "Tarball: $SRC/$TARBALL\n" && exit 0 ;;
    1.22  		esac
    1.23  
    1.24  		# Check if wanted is build now so we have separate log files.
     2.1 --- a/doc/cookutils.en.html	Fri May 06 23:41:09 2011 +0100
     2.2 +++ b/doc/cookutils.en.html	Sat May 07 01:44:24 2011 +0200
     2.3 @@ -31,8 +31,9 @@
     2.4  
     2.5  <h3>Cook usage</h3>
     2.6  <p>
     2.7 -	Cook provide a small built-in help usage that you can display with
     2.8 -	the command:
     2.9 +	Cook provide a small built-in help usage that you can display with the
    2.10 +	command 'usage'. It also have some options to perform special task on
    2.11 +	a package, rater before cooking it or after. To get help and usage:
    2.12  </p>
    2.13  <pre>
    2.14  # cook usage
    2.15 @@ -49,11 +50,11 @@
    2.16  # tazdev gen-chroot &amp;&amp; tazdev chroot
    2.17  </pre>
    2.18  <p>
    2.19 -	By default Tazdev create a chrrot in /home/slitaz/cooking/chroot but you
    2.20 +	By default Tazdev create a chroot in /home/slitaz/cooking/chroot but you
    2.21  	can specify a custome path in argument. The chroot place is not important,
    2.22  	when you will be in the chroot you will use standard SliTaz path such as
    2.23  	/home/slitaz/wok for the wok directory or /home/slitaz/log for all the cook
    2.24 -	logs. As usual you can diplay tazdev help usage with: tazdev usage
    2.25 +	logs. As usual you can diplay tazdev help usage with: tazdev usage.
    2.26  </p>
    2.27  
    2.28  <h3>Getting started</h3>
    2.29 @@ -107,13 +108,26 @@
    2.30  </pre>
    2.31  <p>
    2.32  	If all went well you will find your packages in $SLITAZ/packages
    2.33 -	directory and produced files in $SLITAZ/wok/pkgname. If you want to cook
    2.34 -	and install the package in one command:
    2.35 +	directory and produced files in $SLITAZ/wok/pkgname.
    2.36 +</p>
    2.37 +
    2.38 +<h3>Cook and install</h3>
    2.39 +<p>
    2.40 +	If you want to cook and install the package in one command:
    2.41  </p>
    2.42  <pre>
    2.43  # cook pkgname --install
    2.44  </pre>
    2.45  
    2.46 +<h3>Get sources</h3>
    2.47 +<p>
    2.48 +	If you want or need to download only the sources of a package but without
    2.49 +	building it, you can use the option --getsrc as bellow:
    2.50 +</p>
    2.51 +<pre>
    2.52 +# cook pkgname --getsrc
    2.53 +</pre>
    2.54 +
    2.55  <h3>Clean packages</h3>
    2.56  <p>
    2.57  	After compilation and packaging ther is several files in the wok that take