FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 11-22-2009, 01:20 PM
Ben Hutchings
 
Default copy_modules_dir: Take a list of exclusions after the base directory

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
hook-functions | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/hook-functions b/hook-functions
index 9d59dc1..54fdd67 100644
--- a/hook-functions
+++ b/hook-functions
@@ -183,14 +183,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
}
--
1.6.5.2


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 03:04 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org