diff options
author | Giancarlo Razzolini <grazzolini@archlinux.org> | 2019-10-04 19:30:03 +0200 |
---|---|---|
committer | Giancarlo Razzolini <grazzolini@archlinux.org> | 2019-10-04 19:30:03 +0200 |
commit | b43739e39d9287baaec131f176a350736bffda4d (patch) | |
tree | 15bc4c67b9d99bbffedf91ae2905d7017bca5fd7 | |
parent | 06bc15f71a3e627b62c8de589f8c511deaaca791 (diff) | |
parent | 60713cf838baeaa59b71788aaa0fb421b0ecbcd5 (diff) | |
download | mkinitcpio-b43739e39d9287baaec131f176a350736bffda4d.tar.gz mkinitcpio-b43739e39d9287baaec131f176a350736bffda4d.tar.xz |
Merge branch 'Foxboron-morten/hookdir-flag'
-rw-r--r-- | man/mkinitcpio.8.txt | 5 | ||||
-rwxr-xr-x | mkinitcpio | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/man/mkinitcpio.8.txt b/man/mkinitcpio.8.txt index 79dbee3..a69cf20 100644 --- a/man/mkinitcpio.8.txt +++ b/man/mkinitcpio.8.txt @@ -36,11 +36,14 @@ Options Set 'directory' as the location where the initramfs is built. This might be useful to generate a shutdown ramfs in '/run/initramfs'. +*-D, \--hookdir* 'directory':: + Set 'directory' as the location where hooks will be searched for when + generating the image. + *-g, \--generate* 'filename':: Generate a CPIO image as 'filename'. Default: no; this means nothing will be written to the filesystem unless this option is specified. - *-H, \--hookhelp* 'hookname':: Output help for hookname 'hookname'. @@ -14,6 +14,7 @@ _f_functions=functions _f_config=mkinitcpio.conf _d_hooks="$PWD/hooks:/usr/lib/initcpio/hooks:/lib/initcpio/hooks" _d_install="$PWD/install:/usr/lib/initcpio/install:/lib/initcpio/install" +_d_flag_{hooks,install}= _d_firmware=({/usr,}/lib/firmware/updates {/usr,}/lib/firmware) _d_presets=mkinitcpio.d @@ -56,6 +57,7 @@ usage: ${0##*/} [options] -s, --save Save build directory. (default: no) -d, --generatedir <dir> Write generated image into <dir> -t, --builddir <dir> Use DIR as the temporary build directory + -D, --hookdir <dir> Specify where to look for hooks. -V, --version Display version information and exit -v, --verbose Verbose output (default: no) -z, --compress <program> Use an alternate compressor on the image @@ -408,6 +410,11 @@ while :; do shift _optmoduleroot=$1 ;; + -D|--hookdir) + shift + _d_flag_hooks+="$1/hooks:" + _d_flag_install+="$1/install:" + ;; --) shift break 2 @@ -420,6 +427,11 @@ if [[ -t 1 ]] && (( _optcolor )); then try_enable_color fi +if [[ -n $_d_flag_hooks && -n $_d_flag_install ]]; then + _d_hooks=${_d_flag_hooks%:} + _d_install=${_d_flag_install%:} +fi + # insist that /proc and /dev be mounted (important for chroots) # NOTE: avoid using mountpoint for this -- look for the paths that we actually # use in mkinitcpio. Avoids issues like FS#26344. |