# Distributed under the GPL v2
# $Id$
+ 18 Apr 2012; Robin H. Johnson <robbat2@gentoo.org> gen_initramfs.sh:
+ lddtree call must be outside the for loop.
+
16 Apr 2012; Robin H. Johnson <robbat2@gentoo.org> gen_initramfs.sh:
Use CC0 instead of public domain for copy_binaries to cover French
jurisdiction concerns.
if LC_ALL=C lddtree "${binary}" 2>&1 | fgrep -q 'not found'; then
gen_die "Binary ${binary} is linked to missing libraries and may need to be re-built"
fi
-
- lddtree "${binary}" \
- | tr ')(' '\n' \
- | awk '/=>/{ if($3 ~ /^\//){print $3}}' \
- | sort \
- | uniq \
- | cpio -p --make-directories --dereference --quiet "${destdir}" \
- || gen_die "Binary ${f} or some of its library dependencies could not be copied"
done
+ # This must be OUTSIDE the for loop, we only want to run lddtree etc ONCE.
+ lddtree "$@" \
+ | tr ')(' '\n' \
+ | awk '/=>/{ if($3 ~ /^\//){print $3}}' \
+ | sort \
+ | uniq \
+ | cpio -p --make-directories --dereference --quiet "${destdir}" \
+ || gen_die "Binary ${f} or some of its library dependencies could not be copied"
}
append_base_layout() {