aboutsummarylogtreecommitdiffstats
path: root/upx-exec.sh.in
blob: 119e55b5c4a21c3fcdad87c816f384124dd85aca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/bash
#
#   upx.sh - Confirm presence of upx executable
#

[[ -n "$LIBMAKEPKG_EXECUTABLE_UPX_SH" ]] && return
LIBMAKEPKG_EXECUTABLE_UPX_SH=1

LIBRARY=${LIBRARY:-'@libmakepkgdir@'}

source "$LIBRARY/util/option.sh"

executable_functions+=('executable_upx')

executable_upx() {
    if check_option "upx" "y"; then
        if ! type -p upx >/dev/null; then
            error "$(gettext "Cannot find the %s binary required for compressing binaries.")" "upx"
            ret=1
        fi
    fi
}