diff options
author | Dan McGee <dan@archlinux.org> | 2011-02-01 01:35:30 +0100 |
---|---|---|
committer | Thomas Bächler <thomas@archlinux.org> | 2011-02-01 01:37:15 +0100 |
commit | 0f53f8ead0e5f22744882b5452db1664716d466c (patch) | |
tree | 33ca2976b35db04e31e727079f0ae3422cfd1c86 | |
parent | b5fa5b45283afb697c327fcebaabf0501eeb2920 (diff) | |
download | mkinitcpio-0f53f8ead0e5f22744882b5452db1664716d466c.tar.gz mkinitcpio-0f53f8ead0e5f22744882b5452db1664716d466c.tar.xz |
Use install instead of mkdir/cp
Saves a process invocation per kernel module. Based on work presented in
FS#18347, and fixed to ensure we are using the install utility rather than
our defined function.
Signed-off-by: Dan McGee <dan@archlinux.org>
-rwxr-xr-x | mkinitcpio | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -263,10 +263,10 @@ done if [ "${HAS_MODULES}" = "y" ]; then echo ":: Generating module dependencies" + # unfortuate name collision between a function and utility program + unset install for mod in $(grep "file /lib/modules/${KERNELVERSION}" ${FILELIST} | cut -d' ' -f2); do - dir=$(get_dirname "${mod}") - mkdir -p "${TMPDIR}/${dir}" - cp "${BASEDIR}${mod}" "${TMPDIR}/${dir}/" + install -m 644 -D "${BASEDIR}${mod}" "${TMPDIR}${mod}" done /sbin/depmod -b ${TMPDIR} ${KERNELVERSION} add_file "${TMPDIR}/lib/modules/${KERNELVERSION}/modules.dep" "/lib/modules/${KERNELVERSION}/modules.dep" |