From a0c9eaad1f4bb0af80ec3457145b6ded8a8e5f64 Mon Sep 17 00:00:00 2001 From: Daenyth Blank Date: Sun, 27 Apr 2008 12:43:41 -0400 Subject: [PATCH] Fix FS#10294 Inside tidy_install, change the section which strips libraries to use find | while read rather than for foo in `find`. This should allow whitespaces in filenames to still be processed correctly. Signed-off-by: Daenyth Blank --- scripts/makepkg.sh.in | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 1eb3d3a..0b8f9e4 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -772,12 +772,14 @@ tidy_install() { if [ "$(check_option strip)" = "y" ]; then msg2 "$(gettext "Stripping debugging symbols from binaries and libraries...")" - for file in $(find {,usr/{,local/},opt/*/}{bin,lib,sbin} -type f 2>/dev/null || true); do - case "$(file -biz "$file")" in + local findresult + (find {,usr/{,local/},opt/*/}{bin,lib,sbin} -type f 2>/dev/null || true) | + while read findresult ; do + case "$(file -biz "$findresult")" in *application/x-sharedlib*) # Libraries - /usr/bin/strip --strip-debug "$file";; + /usr/bin/strip --strip-debug "$findresult";; *application/x-executable*) # Binaries - /usr/bin/strip "$file";; + /usr/bin/strip "$findresult";; esac done fi -- 1.5.5.1