summaryrefslogtreecommitdiff
path: root/.config/pacman
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-02-03 22:11:47 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-02-03 22:15:44 -0500
commitcc33e9fda72e1102346034709857fc9f704b6c19 (patch)
tree68daec55fb672fe34273121a58085c9766682af9 /.config/pacman
parenta41c113539cab32ccf697219ef024735bc6fd866 (diff)
makepkg: enable ccache if it is available
Diffstat (limited to '.config/pacman')
-rw-r--r--.config/pacman/makepkg.conf16
1 files changed, 16 insertions, 0 deletions
diff --git a/.config/pacman/makepkg.conf b/.config/pacman/makepkg.conf
index 8dc4536..8389fb5 100644
--- a/.config/pacman/makepkg.conf
+++ b/.config/pacman/makepkg.conf
@@ -1,3 +1,5 @@
+#!/phony/bash
+
PKGDEST="${LIBREHOME:-$HOME}/packages/pkgdest"
SRCDEST="${LIBREHOME:-$HOME}/packages/srcdest"
SRCPKGDEST="${LIBREHOME:-$HOME}/packages/srcpkgdest"
@@ -6,3 +8,17 @@ LOGDEST="${LIBREHOME:-$HOME}/packages/logdest"
PACKAGER="Luke Shumaker <lukeshu@sbcglobal.net>"
MAKEFLAGS="-j3"
+
+if type ccache &>/dev/null; then
+ f=false
+ for i in "${!BUILDENV[@]}"; do
+ if [[ "${BUILDENV[$i]}" == '!ccache' ]]; then
+ BUILDENV[$i]='ccache'
+ f=true
+ fi
+ done
+ if [[ $f == false ]]; then
+ BUILDENV+=('ccache')
+ fi
+ unset f i
+fi