From 491a99b8a2531207121d651d8e4b15fe4febbd2b Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 1 Jul 2011 12:07:46 -0400 Subject: install modules all at once build an array of paths to modules, and install them all at once with mkdir -p and cp --parents. Cuts back on our major source of calls to install(1). This is a tad ugly in that it creates some amount of data duplication, keeping an array of paths in addition to module names. However, turns out to be a worthwhile tradeoff as merging the two datasets into one results in the need for massive string trimming. --- mkinitcpio | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mkinitcpio') diff --git a/mkinitcpio b/mkinitcpio index fb705e1..dec139b 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -25,7 +25,7 @@ COMPRESSION=gzip declare TMPDIR BASEDIR MODULE_FILE GENIMG PRESET COMPRESSION_OPTIONS BUILDROOT declare NC= BOLD= BLUE= GREEN= RED= YELLOW= declare -i QUIET=1 SHOW_AUTOMODS=0 SAVELIST=0 COLOR=1 -declare -a SKIPHOOKS ADDED_MODULES +declare -a SKIPHOOKS ADDED_MODULES MODPATHS # Add /{,usr}/sbin to path # works around undetected problems like in #8448 @@ -323,6 +323,9 @@ set +E trap ERR if (( ${#ADDED_MODULES[*]} )); then + mkdir -p "${MODPATHS[@]%/*}" + cp --parents "${MODPATHS[@]}" "$BUILDROOT" + msg "Generating module dependencies" /sbin/depmod -b "${TMPDIR}/root" "${KERNELVERSION}" rm "$BUILDROOT/lib/modules/$KERNELVERSION"/modules.!(dep.bin|alias.bin|symbols.bin) -- cgit v1.2.3-24-g4f1b