Author: sip Date: 2006-04-29 12:01:52 +0200 (Sat, 29 Apr 2006) New Revision: 1320 Modified: tools/pkgutils/trunk/ChangeLog tools/pkgutils/trunk/pkgmk.in Log: pkgmk: optimize file detection for stripping. Thanks to aon and mark Modified: tools/pkgutils/trunk/ChangeLog =================================================================== --- tools/pkgutils/trunk/ChangeLog 2006-04-28 20:00:52 UTC (rev 1319) +++ tools/pkgutils/trunk/ChangeLog 2006-04-29 10:01:52 UTC (rev 1320) @@ -1,3 +1,6 @@ +2006-04-29 Simone Rota (sip at crux dot nu) + * Optimized file type detection for stripping in pkgmk + Thanks to Antti Nyk�nen 2006-04-14 Tilman Sauerbeck (tilman at crux nu) * ChangeLog, NEWS: Moved old ChangeLog to NEWS * pkgmk.in: Write warnings and errors to stderr instead of stdout Modified: tools/pkgutils/trunk/pkgmk.in =================================================================== --- tools/pkgutils/trunk/pkgmk.in 2006-04-28 20:00:52 UTC (rev 1319) +++ tools/pkgutils/trunk/pkgmk.in 2006-04-29 10:01:52 UTC (rev 1320) @@ -242,13 +242,16 @@ fi find . -type f -printf "%P\n" | $FILTER | while read FILE; do - if file -b "$FILE" | grep '^.*ELF.*executable.*not stripped$' &> /dev/null; then + case $(file -b "$FILE") in + *ELF*executable*not\ stripped) strip --strip-all "$FILE" - elif file -b "$FILE" | grep '^.*ELF.*shared object.*not stripped$' &> /dev/null; then + ;; + *ELF*shared\ object*not\ stripped) strip --strip-unneeded "$FILE" - elif file -b "$FILE" | grep '^current ar archive$' &> /dev/null; then + ;; + current\ ar\ archive) strip --strip-debug "$FILE" - fi + esac done }
participants (1)
-
crux@crux.nu