diff options
Diffstat (limited to 'scripts/brp-strip')
-rwxr-xr-x | scripts/brp-strip | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/brp-strip b/scripts/brp-strip new file mode 100755 index 000000000..7e2939af6 --- /dev/null +++ b/scripts/brp-strip @@ -0,0 +1,12 @@ +#!/bin/sh +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +# Strip ELF binaries +for f in `find $RPM_BUILD_ROOT -type f -a -perm +111 -exec file {} \; | \ + grep -v ' shared object,' | \ + sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do + strip $f +done |