X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=scripts%2Fgen-dependencies.sh;h=85962e74b2a24b9d8583cb7a0de5fdb2fb078d58;hb=cf0567e461d42d34a00c1b4a129526c6967266c9;hp=de8d67376e702fa4bef923110f722e1151556c69;hpb=36b6a6a7aeceead363e19db4c89797665a891b60;p=openwrt.git diff --git a/scripts/gen-dependencies.sh b/scripts/gen-dependencies.sh index de8d67376e..85962e74b2 100755 --- a/scripts/gen-dependencies.sh +++ b/scripts/gen-dependencies.sh @@ -20,7 +20,7 @@ XARGS="${XARGS:-xargs -r}" find $TARGETS -type f -a -exec file {} \; | \ sed -n -e 's/^\(.*\):.*ELF.*\(executable\|shared object\).*,.* stripped/\1/p' | \ - $XARGS -n1 readelf -d | \ + $XARGS -n1 $READELF -d | \ awk '$2 ~ /NEEDED/ && $NF !~ /interpreter/ && $NF ~ /^\[?lib.*\.so/ { gsub(/[\[\]]/, "", $NF); print $NF }' | \ sort -u @@ -31,5 +31,5 @@ for kmod in `find $TARGETS -type f -name \*.ko`; do egrep -a '^depends=' | \ sed -e 's,^depends=,,' -e 's/,/\n/g' | \ awk '{ print $1 ".ko" }' - rm -f $tmp done | sort -u +rm -f $tmp