diff options
author | Morten Linderud <morten@linderud.pw> | 2019-09-17 20:01:28 +0200 |
---|---|---|
committer | Giancarlo Razzolini <grazzolini@archlinux.org> | 2019-10-04 19:29:17 +0200 |
commit | 001a0559cd52d2ab600e31d192198062021e8898 (patch) | |
tree | 22d0a94fc8e22854b3de1fa3621101f137b0131a | |
parent | 66ab66ebccfc66a8d3afd6f331b4548f6cd973a7 (diff) | |
download | mkinitcpio-001a0559cd52d2ab600e31d192198062021e8898.tar.gz mkinitcpio-001a0559cd52d2ab600e31d192198062021e8898.tar.xz |
[mkinitcpio] Support multiple hook paths
-rwxr-xr-x | mkinitcpio | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -14,6 +14,8 @@ _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="" +_d_flag_install="" _d_firmware=({/usr,}/lib/firmware/updates {/usr,}/lib/firmware) _d_presets=mkinitcpio.d @@ -411,8 +413,8 @@ while :; do ;; -D|--hookdir) shift - _d_hooks="$(readlink -f "$1")/hooks" - _d_install="$(readlink -f "$1")/install" + _d_flag_hooks+="$1/hooks:" + _d_flag_install+="$1/install:" ;; --) shift @@ -426,6 +428,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. |