From: Jörg Behrmann Date: Fri, 27 Sep 2024 09:57:33 +0000 (+0200) Subject: doc: Document script directories. X-Git-Tag: v25~262^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97405d0063ec6cb3e5f88a81891d5a4aec7ad357;p=thirdparty%2Fmkosi.git doc: Document script directories. --- diff --git a/mkosi/resources/man/mkosi.md b/mkosi/resources/man/mkosi.md index 8c8531061..25b26a75c 100644 --- a/mkosi/resources/man/mkosi.md +++ b/mkosi/resources/man/mkosi.md @@ -2156,6 +2156,22 @@ image using `mkosi-chroot` (see below) before executing the script. For example, if `mkosi.postinst.chroot` exists, mkosi will chroot into the image and execute it as the post-installation script. +Instead of a single file script, mkosi will also read all files in lexicographical order from appropriately +named `.d` directories, e.g. all files in a `mkosi.build.d` would be used as build scripts. This is supported +by + +* `mkosi.sync.d`, +* `mkosi.prepare.d`, +* `mkosi.build.d`, +* `mkosi.postinst.d`, +* `mkosi.finalize.d`, +* `mkosi.postoutput.d`, and +* `mkosi.clean.d`. + +This can be combined with the `.chroot` extension, e.g. `mkosi.build.d/01-foo.sh` would be run without +chrooting into the image and `mkosi.build.d/02-bar.sh.chroot` would be run after chrooting into the image +first. + Scripts executed by mkosi receive the following environment variables: * `$ARCHITECTURE` contains the architecture from the `Architecture=`