1 |
commit: 4733b318169415c111d029183c2bc181744b7858 |
2 |
Author: Peter Hjalmarsson <xake <AT> rymdraket <DOT> net> |
3 |
AuthorDate: Sun Mar 3 21:11:26 2013 +0000 |
4 |
Commit: Richard Yao <ryao <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 3 21:29:15 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=4733b318 |
7 |
|
8 |
Unify copy_binaries() more |
9 |
|
10 |
As suggested by Vapier in bug #450688. |
11 |
|
12 |
Signed-off-by: Peter Hjalmarsson <xake <AT> rymdraket.net> |
13 |
|
14 |
--- |
15 |
gen_initramfs.sh | 11 ++++------- |
16 |
1 file changed, 4 insertions(+), 7 deletions(-) |
17 |
|
18 |
diff --git a/gen_initramfs.sh b/gen_initramfs.sh |
19 |
index 3ae9d7a..af6dff6 100755 |
20 |
--- a/gen_initramfs.sh |
21 |
+++ b/gen_initramfs.sh |
22 |
@@ -34,21 +34,18 @@ copy_binaries() { |
23 |
done |
24 |
# This must be OUTSIDE the for loop, we only want to run lddtree etc ONCE. |
25 |
# lddtree does not have the -V (version) nor the -l (list) options prior to version 1.18 |
26 |
+ ( |
27 |
if lddtree -V > /dev/null 2>&1 ; then |
28 |
- lddtree -l "$@" \ |
29 |
- | sort \ |
30 |
- | uniq \ |
31 |
- | cpio -p --make-directories --dereference --quiet "${destdir}" \ |
32 |
- || gen_die "Binary ${f} or some of its library dependencies could not be copied" |
33 |
+ lddtree -l "$@" |
34 |
else |
35 |
lddtree "$@" \ |
36 |
| tr ')(' '\n' \ |
37 |
- | awk '/=>/{ if($3 ~ /^\//){print $3}}' \ |
38 |
+ | awk '/=>/{ if($3 ~ /^\//){print $3}}' |
39 |
+ fi ) \ |
40 |
| sort \ |
41 |
| uniq \ |
42 |
| cpio -p --make-directories --dereference --quiet "${destdir}" \ |
43 |
|| gen_die "Binary ${f} or some of its library dependencies could not be copied" |
44 |
- fi |
45 |
} |
46 |
|
47 |
log_future_cpio_content() { |