3 # Copyright (C) 2009 Nick Bowler
4 # Copying and distribution of this file, with or without modification,
5 # are permitted in any medium without royalty provided the copyright
6 # notice and this notice are preserved. This file is offered as-is,
7 # without any warranty.
9 # Generate library dependencies for an initramfs. Finds all dynamically linked
10 # binaries listed in an initramfs description (as needed by gen_init_cpio from
11 # the Linux source) and passes them to libs.sh in order to actually generate
15 echo "usage: genlibs.sh initramfs-desc"
19 files=(`sed -n 's/^ *file \+[^ ]\+ \+\([^ ]\+\).*/\1/p' "$1"`)
24 if ! file "$i" | grep dynamic >/dev/null; then continue; fi