CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Enabled large file support.
[pkgutils-cross.git] / pkgmk.in
index 62a74188f61c2bd1340128f106b277bec9e7c6d7..bfa1701103ac7ca78ae9938066d03461b832f7bb 100755 (executable)
--- a/pkgmk.in
+++ b/pkgmk.in
@@ -25,11 +25,11 @@ info() {
 }
 
 warning() {
-       info "WARNING: $1"
+       info "WARNING: $1" >&2
 }
 
 error() {
-       info "ERROR: $1"
+       info "ERROR: $1" >&2
 }
 
 get_filename() {
@@ -194,7 +194,7 @@ check_md5sum() {
                        sed 's/^-/MISSING   /g' > $FILE.md5sum.diff
                if [ -s $FILE.md5sum.diff ]; then
                        error "Md5sum mismatch found:"
-                       cat $FILE.md5sum.diff
+                       cat $FILE.md5sum.diff >&2
 
                        if [ "$PKGMK_KEEP_WORK" = "no" ]; then
                                rm -rf $PKGMK_WORK_DIR
@@ -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
 }
 
@@ -294,7 +297,7 @@ check_footprint() {
                                sed 's/^-/MISSING   /g' > $FILE.footprint.diff
                        if [ -s $FILE.footprint.diff ]; then
                                error "Footprint mismatch found:"
-                               cat $FILE.footprint.diff
+                               cat $FILE.footprint.diff >&2
                                BUILD_SUCCESSFUL="no"
                        fi
                else