summaryrefslogtreecommitdiff
path: root/scripts/libmakepkg/tidy/upx.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/libmakepkg/tidy/upx.sh.in')
-rw-r--r--scripts/libmakepkg/tidy/upx.sh.in8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/libmakepkg/tidy/upx.sh.in b/scripts/libmakepkg/tidy/upx.sh.in
index ec40b2e2..49104658 100644
--- a/scripts/libmakepkg/tidy/upx.sh.in
+++ b/scripts/libmakepkg/tidy/upx.sh.in
@@ -35,10 +35,12 @@ 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
- if [[ $(file --brief --mime-type "$binary") = 'application/x-executable' ]]; then
- upx "${UPXFLAGS[@]}" "$binary" &>/dev/null ||
+ 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\//}"
- fi
+ ;;
+ esac
done
fi
}