home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / rescue / usr / lib / rpm / brp-strip < prev    next >
Text File  |  2006-11-29  |  514b  |  20 lines

  1. #!/bin/sh
  2. # If using normal root, avoid changing anything.
  3. if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
  4.     exit 0
  5. fi
  6.  
  7. case `uname -a` in
  8. Darwin*) exit 0 ;;
  9. *) ;;
  10. esac
  11.  
  12. # Strip ELF binaries
  13. for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
  14.         grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug"  | \
  15.     grep -v ' shared object,' | \
  16.     grep -v '/lib/modules/' | \
  17.     sed -n -e 's/^\(.*\):[     ]*ELF.*, not stripped/\1/p'`; do
  18.     strip -g "$f" || :
  19. done
  20.