1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-13 17:26:13 +02:00

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 <goliath@infraroot.at>
This commit is contained in:
David Oberhollenzer 2019-03-03 16:13:00 +01:00
parent 5ca8069d5b
commit a0f4d41cfe

View file

@ -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