diff options
author | Kenneth Endfinger | 2020-01-15 14:47:11 -0500 |
---|---|---|
committer | Kenneth Endfinger | 2020-01-15 14:47:11 -0500 |
commit | 0fc96d621dbb3528a4389f9fea2e87be4db4fe89 (patch) | |
tree | 24b6b518bf183a1203d2c635be12e6aac016f396 | |
parent | cc32cebe28829403109b7936dbf1956692b00bba (diff) | |
download | aur-0fc96d621dbb3528a4389f9fea2e87be4db4fe89.tar.gz |
Fix build support when ccache is not available.
-rw-r--r-- | PKGBUILD | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -1,6 +1,6 @@ # Maintainer: Kenneth Endfinger <kaendfinger@gmail.com> pkgname=bazel-git -pkgver=r24483.5e1847c23e +pkgver=r24501.ab6134b185 pkgrel=1 pkgdesc="Correct, reproducible, and fast builds for everyone" arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') @@ -21,11 +21,15 @@ pkgver() { build() { cd "${srcdir}/${pkgname}" - /opt/bazel-bootstrap/bin/bazel build //src:bazel --sandbox_writable_path "${HOME}/.ccache" + EXTRA_BAZEL_ARGS=() + + if [ -d "${HOME}/.ccache" ] + then + EXTRA_BAZEL_ARGS+=("--sandbox_writable_path" "${HOME}/.ccache") + fi + + /opt/bazel-bootstrap/bin/bazel build //src:bazel scripts:bazel-complete.bash "${EXTRA_BAZEL_ARGS[@]}" /opt/bazel-bootstrap/bin/bazel shutdown - ./bazel-bin/src/bazel build scripts:bazel-complete.bash - cd bazel-bin/src - ./bazel shutdown } package() { |