summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Linderud <morten@linderud.pw>2019-09-10 22:54:25 +0200
committerGiancarlo Razzolini <grazzolini@archlinux.org>2019-10-04 19:29:17 +0200
commit66ab66ebccfc66a8d3afd6f331b4548f6cd973a7 (patch)
tree5b060bb633d8e9a10dcf92e65e6a8da2d35cdf51
parent06bc15f71a3e627b62c8de589f8c511deaaca791 (diff)
downloadmkinitcpio-66ab66ebccfc66a8d3afd6f331b4548f6cd973a7.tar.gz
mkinitcpio-66ab66ebccfc66a8d3afd6f331b4548f6cd973a7.tar.xz
Add flag to specify where to look for hooks.
-rw-r--r--man/mkinitcpio.8.txt5
-rwxr-xr-xmkinitcpio6
2 files changed, 10 insertions, 1 deletions
diff --git a/man/mkinitcpio.8.txt b/man/mkinitcpio.8.txt
index 79dbee3..16b914e 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'.
diff --git a/mkinitcpio b/mkinitcpio
index db7a61a..42e78bf 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -56,6 +56,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 +409,11 @@ while :; do
shift
_optmoduleroot=$1
;;
+ -D|--hookdir)
+ shift
+ _d_hooks="$(readlink -f "$1")/hooks"
+ _d_install="$(readlink -f "$1")/install"
+ ;;
--)
shift
break 2