[pacman-dev] [PATCH 1/1] use only mime-type and remove globbing for upx

Christian Hesse list at eworm.de
Sat Jan 24 18:48:43 UTC 2015


From: Christian Hesse <mail at eworm.de>

Signed-off-by: Christian Hesse <mail at eworm.de>
---
 scripts/makepkg.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 2a5fbde..ab821fe 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1912,7 +1912,7 @@ tidy_install() {
 		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 -bi "$binary") = *'application/x-executable'* ]]; then
+			if [[ $(file --brief --mime-type "$binary") = 'application/x-executable' ]]; then
 				upx $UPXFLAGS "$binary" &>/dev/null ||
 						warning "$(gettext "Could not compress binary : %s")" "${binary/$pkgdir\//}"
 			fi
-- 
2.2.2


More information about the pacman-dev mailing list