aboutsummaryrefslogtreecommitdiffstats
path: root/find-debuginfo.sh
diff options
context:
space:
mode:
Diffstat (limited to 'find-debuginfo.sh')
-rwxr-xr-xfind-debuginfo.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/find-debuginfo.sh b/find-debuginfo.sh
index fd5c8d2..4900ff3 100755
--- a/find-debuginfo.sh
+++ b/find-debuginfo.sh
@@ -16,9 +16,9 @@ echo -n > $SOURCEFILE
[[ -n "$EXCLUDE_FROM_STRIP" ]] && \
EXCLUDE_REGEXP=`perl -e 'print "(", join("|", @ARGV), ")"' $EXCLUDE_FROM_STRIP`
-# Strip ELF binaries
+# Strip ELF binaries and shared libs
for f in `find $RPM_BUILD_ROOT -path "${debugdir}" -prune -o -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
- sed -n -e 's/^\(.*\):[ ]*.*ELF.* executable.*, not stripped/\1/p'`
+ sed -n -e 's/^\(.*\):[ ]*.*ELF.* \(executable\|shared object\).*, not stripped/\1/p'`
do
dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p")
bn=$(basename $f .debug).debug
@@ -37,8 +37,8 @@ do
eu-strip -f "${debugfn}" "$f" -o $f.stripped || :
chmod u-w "$f"
fi
- [[ -n "$EXCLUDE_REGEXP" ]] && \
- { echo $f | egrep -qv "$EXCLUDE_REGEXP"; } && mv -f $f.stripped $f
+ { [[ -z "$EXCLUDE_REGEXP" ]] || \
+ { echo $f | egrep -qv "$EXCLUDE_REGEXP"; } } && mv -f $f.stripped $f
rm -f $f.stripped
done