diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2009-11-22 14:20:39 +0000 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2010-02-24 18:54:50 +0100 |
commit | 64882f7235362129e9bae0e7c7788981328d8077 (patch) | |
tree | 12ffbf9dab3212459119121756a9ec2948b15d20 /hook-functions | |
parent | 673abb77821433a67add61ac79d739c6cee9eee0 (diff) | |
download | initramfs-tools-64882f7235362129e9bae0e7c7788981328d8077.tar.gz initramfs-tools-64882f7235362129e9bae0e7c7788981328d8077.zip |
copy_modules_dir: Take a list of exclusions after the base directory
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: maximilian attems <maks@debian.org>
Diffstat (limited to 'hook-functions')
-rw-r--r-- | hook-functions | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/hook-functions b/hook-functions index 90092bd..c40b3a4 100644 --- a/hook-functions +++ b/hook-functions @@ -188,14 +188,24 @@ copy_exec() { copy_modules_dir() { local x_mod + local exclude + local dir="$1" + shift - if ! [ -d "${MODULESDIR}/${1}" ]; then + if ! [ -d "${MODULESDIR}/${dir}" ]; then return; fi if [ "${verbose}" = "y" ]; then - echo "Copying module directory ${1}" + echo "Copying module directory ${dir}" + if [ $# -ge 1 ]; then + echo "(excluding $*)" + fi fi - for x_mod in $(find "${MODULESDIR}/${1}" -name '*.ko' -print); do + while [ $# -ge 1 ]; do + exclude="$exclude -name $1 -prune -o " + shift + done + for x_mod in $(find "${MODULESDIR}/${dir}" ${exclude} -name '*.ko' -print); do manual_add_modules $(basename ${x_mod} .ko) done } |