summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmkinitcpio3
1 files changed, 2 insertions, 1 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 9f39d56..c6528e9 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -358,7 +358,8 @@ parse_hook
trap '(( ++builderrors ))' ERR
if (( ${#ADDED_MODULES[*]} )); then
- cp "${MODPATHS[@]}" "$BUILDROOT/lib/modules/$KERNELVERSION/kernel"
+ printf '%s\0' "${MODPATHS[@]}" | sort -zu |
+ xargs -0 cp -t "$BUILDROOT/lib/modules/$KERNELVERSION/kernel"
# unzip modules prior to recompression
gzip -dr "$BUILDROOT/lib/modules/$KERNELVERSION/kernel"