From: Felix Fietkau Date: Sun, 19 Feb 2017 14:28:01 +0000 (+0100) Subject: gen-dependencies.sh: fix handling variations in "file" output X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=fffabd3c44137f07f8c8959c1b16ad6944bc5110;p=openwrt%2Fstaging%2Frmilecki.git gen-dependencies.sh: fix handling variations in "file" output On some systems, file adds ", with debug info" after "not stripped" Signed-off-by: Felix Fietkau --- diff --git a/scripts/gen-dependencies.sh b/scripts/gen-dependencies.sh index c6b6f75f55d..0aa01b78ec3 100755 --- a/scripts/gen-dependencies.sh +++ b/scripts/gen-dependencies.sh @@ -19,7 +19,7 @@ XARGS="${XARGS:-xargs -r}" } find $TARGETS -type f -a -exec file {} \; | \ - sed -n -e 's/^\(.*\):.*ELF.*\(executable\|shared object\).*,.* stripped/\1/p' | \ + sed -n -e 's/^\(.*\):.*ELF.*\(executable\|shared object\).*,.*/\1/p' | \ $XARGS -n1 $READELF -d | \ awk '$2 ~ /NEEDED/ && $NF !~ /interpreter/ && $NF ~ /^\[?lib.*\.so/ { gsub(/[\[\]]/, "", $NF); print $NF }' | \ sort -u