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>
This commit is contained in:
Christian Hesse 2015-01-26 11:25:22 +01:00 committed by Allan McRae
parent 2e48101999
commit bd2e95b00b
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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