Unify copy_binaries() more

As suggested by Vapier in bug #450688.

Signed-off-by: Peter Hjalmarsson <xake@rymdraket.net>
cleanup-cruft
Peter Hjalmarsson 12 years ago
parent 6cc7e382d6
commit 4733b31816

@ -34,21 +34,18 @@ copy_binaries() {
done done
# This must be OUTSIDE the for loop, we only want to run lddtree etc ONCE. # 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 # 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 if lddtree -V > /dev/null 2>&1 ; then
lddtree -l "$@" \ 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"
else else
lddtree "$@" \ lddtree "$@" \
| tr ')(' '\n' \ | tr ')(' '\n' \
| awk '/=>/{ if($3 ~ /^\//){print $3}}' \ | awk '/=>/{ if($3 ~ /^\//){print $3}}'
fi ) \
| sort \ | sort \
| uniq \ | uniq \
| cpio -p --make-directories --dereference --quiet "${destdir}" \ | cpio -p --make-directories --dereference --quiet "${destdir}" \
|| gen_die "Binary ${f} or some of its library dependencies could not be copied" || gen_die "Binary ${f} or some of its library dependencies could not be copied"
fi
} }
log_future_cpio_content() { log_future_cpio_content() {

Loading…
Cancel
Save