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:
parent
2e48101999
commit
bd2e95b00b
2 changed files with 4 additions and 4 deletions
|
@ -179,7 +179,7 @@ Options
|
||||||
|
|
||||||
*upx*;;
|
*upx*;;
|
||||||
Compress binary executable files using UPX. Additional options
|
Compress binary executable files using UPX. Additional options
|
||||||
can be passed to UPX by specifying the `UPXFLAGS` variable.
|
can be passed to UPX by specifying the `UPXFLAGS` array variable.
|
||||||
|
|
||||||
*debug*;;
|
*debug*;;
|
||||||
Add the user-specified debug flags as specified in DEBUG_CFLAGS and
|
Add the user-specified debug flags as specified in DEBUG_CFLAGS and
|
||||||
|
|
|
@ -1912,8 +1912,8 @@ tidy_install() {
|
||||||
msg2 "$(gettext "Compressing binaries with %s...")" "UPX"
|
msg2 "$(gettext "Compressing binaries with %s...")" "UPX"
|
||||||
local binary
|
local binary
|
||||||
find . -type f -perm -u+w 2>/dev/null | while read -r binary ; do
|
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 ||
|
upx "${UPXFLAGS[@]}" "$binary" &>/dev/null ||
|
||||||
warning "$(gettext "Could not compress binary : %s")" "${binary/$pkgdir\//}"
|
warning "$(gettext "Could not compress binary : %s")" "${binary/$pkgdir\//}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue