setup-hooks/strip: more robust stripping

Use "find -exec" to strip rather than "find … | xargs …". The former
ensures that stripping is attempted for each file, whereas the latter
will stop stripping at the first failure. Unstripped files can fool
runtime dependency detection and bloat closure sizes.
This commit is contained in:
Emery Hemingway 2020-11-25 17:27:31 +01:00 committed by Frederik Rietdijk
parent 46b8c00d0d
commit e4d17dc558

View File

@ -51,7 +51,7 @@ stripDirs() {
if [ -n "${dirs}" ]; then
header "stripping (with command $cmd and flags $stripFlags) in$dirs"
find $dirs -type f -print0 | xargs -0 ${xargsFlags:--r} $cmd $commonStripFlags $stripFlags 2>/dev/null || true
find $dirs -type f -exec $cmd $commonStripFlags $stripFlags '{}' \; #
stopNest
fi
}