Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
8789d515
Commit
8789d515
authored
Mar 26, 2015
by
Andy Whitcroft
Committed by
Tim Gardner
Feb 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UBUNTU: [Debian] module-inclusion -- commonise copy code and simplify
Signed-off-by:
Andy Whitcroft
<
apw@canonical.com
>
parent
c1c60129
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
29 deletions
+35
-29
debian/scripts/module-inclusion
debian/scripts/module-inclusion
+35
-29
No files found.
debian/scripts/module-inclusion
View file @
8789d515
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
# The includsion list format must be a bash regular expression.
# The includsion list format must be a bash regular expression.
#
#
# usage: $0 ROOT INCLUSION_LIST
# usage: $0 ROOT INCLUSION_LIST
# example: $0
debian/build/build-virtual
\
# example: $0 \
# debian/build/build-virtual-ALL debian/build/build-virtual \
# debian/build/build-virtual-ALL debian/build/build-virtual \
# debian.master/control.d/virtual.inclusion-list
# debian.master/control.d/virtual.inclusion-list
master
=
0
master
=
0
...
@@ -23,38 +23,44 @@ ILIST=$3
...
@@ -23,38 +23,44 @@ ILIST=$3
#
#
mkdir
-p
${
NROOT
}
mkdir
-p
${
NROOT
}
# Copy over the framework...
{
if
[
"
$master
"
-eq
1
]
;
then
# Copy over the framework into the master package.
(
cd
${
ROOT
}
;
find
.
!
-name
"*.ko"
-type
f
)
|
\
if
[
"
$master
"
-eq
1
]
;
then
while
read
f
(
cd
${
ROOT
}
;
find
.
!
-name
"*.ko"
-type
f
)
do
fi
mkdir
-p
${
NROOT
}
/
`
dirname
$f
`
mv
${
ROOT
}
/
$f
${
NROOT
}
/
$f
done
fi
cat
${
ILIST
}
|while
read
i
# Copy over modules by name or pattern.
while
read
i
do
#
# 'find' blurts a warning if it cannot find any ko files.
#
case
"
$i
"
in
*
\*
*
)
(
cd
${
ROOT
}
;
eval
find
"
${
i
}
"
-name
"*.ko"
||
true
)
;;
*
)
echo
"
$i
"
;;
esac
done
<
"
${
ILIST
}
"
# Copy over the listed modules.
}
|
\
while
read
i
do
do
#
#
If this is already moved over, all is good.
# 'find' blurts a warning if it cannot find any ko files.
if
[
-f
"
${
NROOT
}
/
$i
"
]
;
then
#
:
if
echo
"
$i
"
|
grep
'\*'
>
/dev/null
then
# If present in the source, moved it over.
(
cd
${
ROOT
}
;
eval
find
"
${
i
}
"
-name
"*.ko"
)
|while
read
f
elif
[
-f
"
${
ROOT
}
/
$i
"
]
;
then
do
mkdir
-p
"
${
NROOT
}
/
`
dirname
$i
`
"
mkdir
-p
${
NROOT
}
/
`
dirname
$f
`
mv
"
${
ROOT
}
/
$i
"
"
${
NROOT
}
/
$i
"
mv
${
ROOT
}
/
$f
${
NROOT
}
/
$f
done
# Otherwise, it is missing.
else
else
if
[
-f
"
${
ROOT
}
/
$i
"
]
echo
"Warning: Could not find
${
ROOT
}
/
$i
"
1>&2
then
mkdir
-p
${
NROOT
}
/
`
dirname
$i
`
mv
${
ROOT
}
/
$i
${
NROOT
}
/
$i
else
echo
Warning: Could not find
${
ROOT
}
/
$i
fi
fi
fi
done
done
exit
0
exit
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment