summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2015-01-26 11:25:22 +0100
committerAllan McRae <allan@archlinux.org>2015-02-01 12:19:04 +0100
commitbd2e95b00be2ce36767811d2da6d291c85f9a3f1 (patch)
tree07fa654385a94f47682714cd1aca7040dcdfb419
parent2e481019998b3e52c6777f7c0648e32e2348ae8c (diff)
downloadpacman-bd2e95b00be2ce36767811d2da6d291c85f9a3f1.tar.gz
pacman-bd2e95b00be2ce36767811d2da6d291c85f9a3f1.tar.xz
remove globbing for upx and make UPXFLAGS an array variable
Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--doc/makepkg.conf.5.txt4
-rw-r--r--scripts/makepkg.sh.in4
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt
index 5bd3a4a8..5e34b916 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 9ff1d11a..4640f033 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