aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hjalmarsson <xake@rymdraket.net>2013-03-03 22:11:26 +0100
committerDaniel Robbins <drobbins@funtoo.org>2013-04-27 01:26:26 +0000
commitc92091c83006a38d1f93380db4c3a42aa95ebba0 (patch)
tree3ee51e2972979a6014354fb014e6d940baa6e196
parentMake copy_binaries compatible with lddtree from pax-utils-0.6 (diff)
downloadgenkernel-c92091c83006a38d1f93380db4c3a42aa95ebba0.tar.gz
genkernel-c92091c83006a38d1f93380db4c3a42aa95ebba0.tar.bz2
genkernel-c92091c83006a38d1f93380db4c3a42aa95ebba0.zip
Unify copy_binaries() morev3.4.40.2-funtoov3.4.40-r4-funtoo
As suggested by Vapier in bug #450688. Signed-off-by: Peter Hjalmarsson <xake@rymdraket.net>
-rwxr-xr-xgen_initramfs.sh11
1 files changed, 4 insertions, 7 deletions
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index a38368b7..255362de 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() {