CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
pkgmk: optimize file detection for stripping. Thanks to aon and mark
authorSimone Rota <sip@crux.nu>
Sat, 29 Apr 2006 08:01:53 +0000 (10:01 +0200)
committerSimone Rota <sip@crux.nu>
Sat, 29 Apr 2006 08:01:53 +0000 (10:01 +0200)
ChangeLog
pkgmk.in

index 47361a80402c0eb4043b32320813719a33f29cab..4e7f5423b5bf3aec7d82f50713aa820631a58a11 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 51fd8f6d0faf21493df3eb6b8ac780d7dea67774..bfa1701103ac7ca78ae9938066d03461b832f7bb 100755 (executable)
--- a/pkgmk.in
+++ b/pkgmk.in
@@ -242,13 +242,16 @@ strip_files() {
        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
 }