diff options
author | Peter Hjalmarsson <xake@rymdraket.net> | 2013-03-03 22:11:26 +0100 |
---|---|---|
committer | Peter Hjalmarsson <xake@rymdraket.net> | 2013-03-03 22:29:15 +0100 |
commit | 4733b318169415c111d029183c2bc181744b7858 (patch) | |
tree | be0601580e49332e31ef1dcc8ffed222fe6afbd0 | |
parent | Make copy_binaries compatible with lddtree from pax-utils-0.6 (diff) | |
download | genkernel-4733b318169415c111d029183c2bc181744b7858.tar.gz genkernel-4733b318169415c111d029183c2bc181744b7858.tar.bz2 genkernel-4733b318169415c111d029183c2bc181744b7858.zip |
Unify copy_binaries() more
As suggested by Vapier in bug #450688.
Signed-off-by: Peter Hjalmarsson <xake@rymdraket.net>
-rwxr-xr-x | gen_initramfs.sh | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 3ae9d7a..af6dff6 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -34,21 +34,18 @@ copy_binaries() { done # This must be OUTSIDE the for loop, we only want to run lddtree etc ONCE. # lddtree does not have the -V (version) nor the -l (list) options prior to version 1.18 + ( if lddtree -V > /dev/null 2>&1 ; then - lddtree -l "$@" \ - | sort \ - | uniq \ - | cpio -p --make-directories --dereference --quiet "${destdir}" \ - || gen_die "Binary ${f} or some of its library dependencies could not be copied" + lddtree -l "$@" else lddtree "$@" \ | tr ')(' '\n' \ - | awk '/=>/{ if($3 ~ /^\//){print $3}}' \ + | awk '/=>/{ if($3 ~ /^\//){print $3}}' + fi ) \ | sort \ | uniq \ | cpio -p --make-directories --dereference --quiet "${destdir}" \ || gen_die "Binary ${f} or some of its library dependencies could not be copied" - fi } log_future_cpio_content() { |