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-static-archive < prev    next >
Text File  |  2006-11-29  |  389b  |  19 lines

  1. #!/bin/sh
  2.  
  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 static libraries.
  13. for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \
  14.         grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug"  | \
  15.     grep 'current ar archive' | \
  16.     sed -n -e 's/^\(.*\):[     ]*current ar archive/\1/p'`; do
  17.     strip -g "$f"
  18. done
  19.