cookutils diff doc/receipts-v2.md @ rev 979

lighttpd/index.cgi: try to improve links in the top "Debug information" block.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Oct 17 14:25:04 2017 +0300 (2017-10-17)
parents 4402dabf5734
children c13b693c75c8
line diff
     1.1 --- a/doc/receipts-v2.md	Thu Jun 01 19:27:13 2017 +0100
     1.2 +++ b/doc/receipts-v2.md	Tue Oct 17 14:25:04 2017 +0300
     1.3 @@ -89,3 +89,67 @@
     1.4  
     1.5      post_install_coreutils_disk()
     1.6  
     1.7 +
     1.8 +Function `copy()`
     1.9 +-----------------
    1.10 +
    1.11 +It's the flexible tool allowing you to copy files and folders from `$install` to
    1.12 +`$fs` using patterns. All files are copied with the folder structure preserved:
    1.13 +
    1.14 +    $install/my/folder/       ->   $fs/my/folder/
    1.15 +    $install/my/system/file   ->   $fs/my/system/file
    1.16 +
    1.17 +Now `copy()` understands 4 main forms of patterns:
    1.18 +
    1.19 +  * `@std`    - all the "standard" files;
    1.20 +  * `@dev`    - all the "developer" files;
    1.21 +  * `folder/` - append folder name in question by slash;
    1.22 +  * `file`    - file name without the slash in the end.
    1.23 +
    1.24 +Both patterns `@std` and `@dev` are meta-patterns making the most common actions
    1.25 +extremely simple.
    1.26 +
    1.27 +In the `folder/` and `file` forms of the patterns you can use the asterisk (`*`)
    1.28 +symbol meaning any number of any characters.
    1.29 +
    1.30 +Some examples (executed on the chroot with the "busybox" package installed):
    1.31 +
    1.32 +```
    1.33 +  Pattern  | Result
    1.34 +===========|====================================================================
    1.35 +   bin/    | /bin
    1.36 +           | /usr/bin
    1.37 +-----------|--------------------------------------------------------------------
    1.38 +  *bin/    | /bin
    1.39 +           | /sbin
    1.40 +           | /usr/bin
    1.41 +           | /usr/sbin
    1.42 +           | /var/www/cgi-bin
    1.43 +-----------|--------------------------------------------------------------------
    1.44 + /usr/bin/ | /usr/bin
    1.45 +-----------|--------------------------------------------------------------------
    1.46 +  usr/bin/ | /usr/bin
    1.47 +-----------|--------------------------------------------------------------------
    1.48 +    r/bin/ |
    1.49 +===========|====================================================================
    1.50 +    cat    | /bin/cat
    1.51 +-----------|--------------------------------------------------------------------
    1.52 +   *.sh    | /lib/libtaz.sh
    1.53 +           | /sbin/mktazdevs.sh
    1.54 +           | /usr/bin/gettext.sh
    1.55 +           | /usr/bin/httpd_helper.sh
    1.56 +           | /usr/lib/slitaz/httphelper.sh
    1.57 +           | /usr/lib/slitaz/libpkg.sh
    1.58 +           | /var/www/cgi-bin/cgi-env.sh
    1.59 +-----------|--------------------------------------------------------------------
    1.60 +    pt*    | /dev/pts
    1.61 +           | /usr/share/locale/pt_BR
    1.62 +           | /usr/share/locale/pt_BR/LC_MESSAGES
    1.63 +-----------|--------------------------------------------------------------------
    1.64 + /bin/*.sh | /usr/bin/gettext.sh
    1.65 +           | /usr/bin/httpd_helper.sh
    1.66 +-----------|--------------------------------------------------------------------
    1.67 + /lib/*.sh | /lib/libtaz.sh
    1.68 +           | /usr/lib/slitaz/httphelper.sh
    1.69 +           | /usr/lib/slitaz/libpkg.sh
    1.70 +```