makepkg: remove grep calls from stripping binaries

Remove grep calls from stripping binaries and libraries, which will
not work with localized strings. Clean up the find usage as well.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Andrew Fyfe 2007-04-16 22:12:15 -04:00 committed by Dan McGee
parent 8bd0f3921f
commit 721ceee1e2

View file

@ -997,14 +997,15 @@ cd "$startdir"
# strip binaries # strip binaries
if [ "$(check_option strip)" = "y" ]; then if [ "$(check_option strip)" = "y" ]; then
msg "$(gettext "Stripping debugging symbols from libraries...")" msg "$(gettext "Stripping symbols from binaries and libraries...")"
find pkg/{,usr,usr/local,opt/*}/lib -type f -not -name "*.dll" -not -name "*.exe" \ for file in $(find pkg/*/{bin,lib,sbin} -type f 2>/dev/null || true ); do
-exec /usr/bin/strip --strip-debug '{}' \; 2>&1 \ case "$(file -biz "$file")" in
| grep -v "No such file" | grep -v "format not recognized" *application/x-sharedlib*) # Libraries
msg "$(gettext "Stripping symbols from binaries...")" /usr/bin/strip --strip-debug "$file";;
find pkg/{,usr,usr/local,opt/*}/{bin,sbin} -type f -not -name "*.dll" -not -name "*.exe" \ *application/x-executable*) # Binaries
-exec /usr/bin/strip '{}' \; 2>&1 \ /usr/bin/strip "$file";;
| grep -v "No such file" | grep -v "format not recognized" esac
done
fi fi
# remove libtool (.la) files # remove libtool (.la) files