From 172ca644527cfaf3bba1dbeab9e7139cca2b249a Mon Sep 17 00:00:00 2001 From: Erik Stromdahl Date: Thu, 1 Jun 2017 19:29:18 +0200 Subject: functions: add_full_dir: path prefix strip-off Add third argument to add_full_dir: strip_prefix. The strip_prefix will be stripped off from the destination path (path in the initramfs image) when adding files. Rationale: Make it easier to add rootfs overlay hooks when generating images. add_full_dir can be invoked in this way: add_full_dir /path/on/parent/rootfs-overlay * /path/on/parent/rootfs-overlay The above invocation will add all content of */path/on/parent/rootfs-overlay* into */* in the initramfs image. Signed-off-by: Erik Stromdahl --- man/mkinitcpio.8.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'man') diff --git a/man/mkinitcpio.8.txt b/man/mkinitcpio.8.txt index 5c3118e..931a167 100644 --- a/man/mkinitcpio.8.txt +++ b/man/mkinitcpio.8.txt @@ -139,7 +139,7 @@ functions exist to facilitate this. Adds a directory and its parents to the image. -*add_full_dir* 'directory' [ 'glob' ]:: +*add_full_dir* 'directory' [ 'glob' ] [ 'strip_prefix' ]:: Recursively adds a directory to the image by walking the given path and calling *add_file*, *add_dir*, and *add_symlink* accordingly. This function @@ -148,6 +148,11 @@ functions exist to facilitate this. If the 'glob' argument is passed, only files and symlinks matching this glob will be added. + If the 'strip_prefix' argument is passed, it will be used to strip the + destination path (path in the initramfs image) from the prefix specified by + the 'strip_prefix' argument. This can be useful when writing rootfs-overlay + hooks. + *add_symlink* 'path' [ 'link-target' ]:: Adds a symlink to the image at the specified `path`, optionally pointing to -- cgit v1.2.3-24-g4f1b