aboutsummarylogtreecommitdiffstats
path: root/buildcache.sh.in
blob: 1040557aa8a7f194e1d9cdedd6bfcede654fc244 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/bash

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

LIBRARY=${LIBRARY:-'/usr/share/makepkg'}

source "$LIBRARY/util/message.sh"
source "$LIBRARY/util/option.sh"

executable_functions+=('executable_buildcache')

executable_buildcache() {
    if check_buildoption "buildcache" "y"; then
        if ! type -p buildcache >/dev/null; then
            error "$(gettext "Cannot find the %s binary required for compiler cache usage.")" "buildcache"
            return 1
        fi
    fi
}