diff options
Diffstat (limited to 'upx.sh.in')
-rw-r--r-- | upx.sh.in | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/upx.sh.in b/upx.sh.in index 4cfaeb0d692b..6b45565a1928 100644 --- a/upx.sh.in +++ b/upx.sh.in @@ -19,12 +19,18 @@ tidy_upx() { msg2 "$(gettext "Compressing binaries with %s...")" "UPX" local binary find . -type f -perm -u+w 2>/dev/null | while read -r binary ; do - case "$(file --brief --mime-type "$binary")" in - 'application/x-executable' | 'application/x-dosexec') - upx "${UPXFLAGS[@]}" "$binary" &>/dev/null || - warning "$(gettext "Could not compress binary : %s")" "${binary/$pkgdir\//}" + if [[ $(file --brief --mime-type "$binary") == application* ]] ; then + case "$(file --brief --mime-type "$binary")" in + 'application/x-executable' | 'application/x-dosexec') # | 'application/x-pie-executable') + upx "${UPXFLAGS[@]}" "$binary" &>/dev/null || + warning "$(gettext "Could not compress binary : %s")" "${binary/$pkgdir\//}" ;; - esac + *) + warning "$(gettext "Not compressing %s, $(file --brief --mime-type "$binary")")" \ + "${binary/$pkgdir\//}" + ;; + esac + fi done fi } |