From a0f4d41cfecc6310e1dd97ae37f1639d1d63b537 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 3 Mar 2019 16:13:00 +0100 Subject: [PATCH] fix strip_files: don't check filename against ELF If we use "file ... | grep -i elf" to detect if a file is an ELF binary, a file *named* elf will erroneously trigger it. This commit adds a flag to disable printing of the file name. Signed-off-by: David Oberhollenzer --- util/misc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/misc.sh b/util/misc.sh index a3d331d..9b0c7aa 100644 --- a/util/misc.sh +++ b/util/misc.sh @@ -20,7 +20,7 @@ strip_files() { [ -f "$f" ] || continue; - if file $f | grep -q -i elf; then + if file -b $f | grep -q -i elf; then ${TARGET}-strip --discard-all "$f" fi done