4
# Build a new directory of modules based on an inclusion list.
5
# The includsion list format must be a bash regular expression.
7
# usage: $0 ROOT INCLUSION_LIST
9
# debian/build/build-virtual-ALL debian/build/build-virtual \
10
# debian.master/control.d/virtual.inclusion-list
12
if [ "$1" = "--master" ]; then
22
# Prep a destination directory.
27
# Copy over the framework into the master package.
28
if [ "$master" -eq 1 ]; then
29
(cd ${ROOT}; find . ! -name "*.ko" -type f)
32
# Copy over modules by name or pattern.
36
# 'find' blurts a warning if it cannot find any ko files.
40
(cd ${ROOT}; ${i#!} || true)
43
(cd ${ROOT}; eval find "${i}" -name "*.ko" || true)
50
# Copy over the listed modules.
54
# If this is already moved over, all is good.
55
if [ -f "${NROOT}/$i" ]; then
58
# If present in the source, moved it over.
59
elif [ -f "${ROOT}/$i" ]; then
60
mkdir -p "${NROOT}/`dirname $i`"
61
mv "${ROOT}/$i" "${NROOT}/$i"
63
# Otherwise, it is missing.
65
echo "Warning: Could not find ${ROOT}/$i" 1>&2