diff options
author | Kenneth Endfinger | 2020-01-15 14:53:21 -0500 |
---|---|---|
committer | Kenneth Endfinger | 2020-01-15 14:53:36 -0500 |
commit | 33fd96172d0ce663b7fa05002df162f0e04d866f (patch) | |
tree | bacf069c04bc711dd7247ccefa153904a272ff83 | |
parent | 0fc96d621dbb3528a4389f9fea2e87be4db4fe89 (diff) | |
download | aur-33fd96172d0ce663b7fa05002df162f0e04d866f.tar.gz |
Detect ccache directory from ccache configuration.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 13 |
2 files changed, 11 insertions, 4 deletions
@@ -1,6 +1,6 @@ pkgbase = bazel-git pkgdesc = Correct, reproducible, and fast builds for everyone - pkgver = r24483.5e1847c23e + pkgver = r24502.9ec89b9194 pkgrel = 1 url = http://bazel.io/ arch = i686 @@ -1,6 +1,6 @@ # Maintainer: Kenneth Endfinger <kaendfinger@gmail.com> pkgname=bazel-git -pkgver=r24501.ab6134b185 +pkgver=r24502.9ec89b9194 pkgrel=1 pkgdesc="Correct, reproducible, and fast builds for everyone" arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') @@ -23,9 +23,16 @@ build() { EXTRA_BAZEL_ARGS=() - if [ -d "${HOME}/.ccache" ] + CCACHE_DIR="${HOME}/.ccache" + + if command -v ccache > /dev/null + then + CCACHE_DIR="$(ccache -k cache_dir)" + fi + + if [ -d "${CCACHE_DIR}" ] then - EXTRA_BAZEL_ARGS+=("--sandbox_writable_path" "${HOME}/.ccache") + EXTRA_BAZEL_ARGS+=("--sandbox_writable_path" "${CCACHE_DIR}") fi /opt/bazel-bootstrap/bin/bazel build //src:bazel scripts:bazel-complete.bash "${EXTRA_BAZEL_ARGS[@]}" |