[source] gen-dependencies.sh: fix handling variations in "file" output

LEDE Commits lede-commits at lists.infradead.org
Sun Feb 19 07:56:37 PST 2017


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/663f2a0864b0ca7e65575fc75479e37712a80114

commit 663f2a0864b0ca7e65575fc75479e37712a80114
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Feb 19 15:28:01 2017 +0100

    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 <nbd at nbd.name>
---
 scripts/gen-dependencies.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen-dependencies.sh b/scripts/gen-dependencies.sh
index c6b6f75..0aa01b7 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



More information about the lede-commits mailing list