home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 March / PCWELT_3_2006.ISO / base / 05_common.mo / usr / lib / rpm / brp-strip-static-archive < prev    next >
Encoding:
Text File  |  2003-10-29  |  337 b   |  14 lines

  1. #!/bin/sh
  2.  
  3. if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
  4.     exit 0
  5. fi
  6.  
  7. # Strip static libraries.
  8. for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \
  9.         grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug"  | \
  10.     grep 'current ar archive' | \
  11.     sed -n -e 's/^\(.*\):[     ]*current ar archive/\1/p'`; do
  12.     strip -g $f
  13. done
  14.