aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfind-debuginfo.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/find-debuginfo.sh b/find-debuginfo.sh
index 4900ff3..1ec4a18 100755
--- a/find-debuginfo.sh
+++ b/find-debuginfo.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#find-debuginfo.sh - automagically generate debug info and file list
#for inclusion in an rpm spec file.
@@ -20,6 +20,9 @@ EXCLUDE_REGEXP=`perl -e 'print "(", join("|", @ARGV), ")"' $EXCLUDE_FROM_STRIP`
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\|shared object\).*, not stripped/\1/p'`
do
+ [[ -n "$EXCLUDE_REGEXP" ]] && egrep -q "$EXCLUDE_REGEXP" <<< "$f" && \
+ continue
+
dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p")
bn=$(basename $f .debug).debug
@@ -31,15 +34,12 @@ do
echo extracting debug info from $f
/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f"
if test -w "$f"; then
- eu-strip -f "${debugfn}" "$f" -o $f.stripped || :
+ eu-strip -f "${debugfn}" "$f" || :
else
chmod u+w "$f"
- eu-strip -f "${debugfn}" "$f" -o $f.stripped || :
+ eu-strip -f "${debugfn}" "$f" || :
chmod u-w "$f"
fi
- { [[ -z "$EXCLUDE_REGEXP" ]] || \
- { echo $f | egrep -qv "$EXCLUDE_REGEXP"; } } && mv -f $f.stripped $f
- rm -f $f.stripped
done
mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug