summarylogtreecommitdiffstats
path: root/upx.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'upx.sh.in')
-rw-r--r--upx.sh.in17
1 files changed, 9 insertions, 8 deletions
diff --git a/upx.sh.in b/upx.sh.in
index 43c33d37fc60..0de332c8049c 100644
--- a/upx.sh.in
+++ b/upx.sh.in
@@ -20,16 +20,17 @@ tidy_upx() {
local binary
find . -type f -perm -u+w 2>/dev/null | while read -r binary ; do
[ $(jobs -p|wc -l) -gt $(getconf _NPROCESSORS_ONLN) ] && wait -n
- mime=$(file --brief --mime-type "$binary")
- case "$mime" in
- application/x-executable | application/x-dosexec )
- { upx "${UPXFLAGS[@]}" "$binary" &>/dev/null ||
+ case "$(file -S --brief --mime-type "$binary")" in
+ application/x-executable | application/x-dosexec | \
+ application/x-pie-executable | application/x-sharedlib )
+ { upx "${UPXFLAGS[@]}" "$binary" &>/dev/null &&
+ info "$(gettext "Compressed binary : %s")" "${binary/$pkgdir\//}" ||
warning "$(gettext "Could not compress binary : %s")" "${binary/$pkgdir\//}"; } &
;;
- application* )
- warning "$(gettext "Not compressing %s, $(file --brief --mime-type "$binary")")" \
- "${binary/$pkgdir\//}"
- ;;
+ #application* )
+ # warning "$(gettext "Not compressing %s, $(file --brief --mime-type "$binary")")" \
+ # "${binary/$pkgdir\//}"
+ #;;
esac
done
wait