[pacman-dev] [PATCH v3 1/2] remove globbing for upx and make UPXFLAGS an array variable
Christian Hesse
list at eworm.de
Mon Jan 26 10:25:22 UTC 2015
From: Christian Hesse <mail at eworm.de>
Signed-off-by: Christian Hesse <mail at eworm.de>
---
doc/makepkg.conf.5.txt | 4 ++--
scripts/makepkg.sh.in | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt
index 5bd3a4a..5e34b91 100644
--- a/doc/makepkg.conf.5.txt
+++ b/doc/makepkg.conf.5.txt
@@ -178,8 +178,8 @@ Options
package.
*upx*;;
- Compress binary executable files using UPX. Additional options
- can be passed to UPX by specifying the `UPXFLAGS` variable.
+ Compress binary executable files using UPX. Additional options
+ can be passed to UPX by specifying the `UPXFLAGS` array variable.
*debug*;;
Add the user-specified debug flags as specified in DEBUG_CFLAGS and
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 00beb76..72f5b04 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1912,8 +1912,8 @@ 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
- upx $UPXFLAGS "$binary" &>/dev/null ||
+ 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
done
--
2.2.2
More information about the pacman-dev
mailing list