summaryrefslogtreecommitdiff
path: root/.config/pacman/makepkg.conf
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-01-10 19:38:58 -0500
committerLuke Shumaker <lukeshu@lukeshu.com>2018-01-10 19:38:58 -0500
commita2cd9d788f7b39e9f17d1fa2dc1382bd2f98e2c1 (patch)
treef2f5c900f0c9aded26d3d9ca0c25e9a6029a7a9e /.config/pacman/makepkg.conf
parent75a63c7e7b3b055198884f31c0d7c516eaf9d32e (diff)
parent971e265cac74976670da2a87805b644e90826b95 (diff)
Merge branch 'master' into build64-par/master
Diffstat (limited to '.config/pacman/makepkg.conf')
-rw-r--r--.config/pacman/makepkg.conf40
1 files changed, 30 insertions, 10 deletions
diff --git a/.config/pacman/makepkg.conf b/.config/pacman/makepkg.conf
index 2e627b8..fe64828 100644
--- a/.config/pacman/makepkg.conf
+++ b/.config/pacman/makepkg.conf
@@ -9,16 +9,36 @@ PACKAGER="Luke Shumaker <lukeshu@sbcglobal.net>"
MAKEFLAGS="-j$(($(nproc)+1))"
-if type ccache &>/dev/null; then
- f=false
+lukeshu_set_BUILDENV() {
+ local thing=$1
+ local i
for i in "${!BUILDENV[@]}"; do
- if [[ "${BUILDENV[$i]}" == '!ccache' ]]; then
- BUILDENV[$i]='ccache'
- f=true
- fi
+ case "${BUILDENV[$i]}" in
+ "!${thing#!}"|"${thing#!}")
+ BUILDENV[$i]=$thing
+ return
+ ;;
+ esac
+ done
+ BUILDENV+=("$thing")
+}
+
+lukeshu_set_OPTIONS() {
+ local thing=$1
+ local i
+ for i in "${!OPTIONS[@]}"; do
+ case "${OPTIONS[$i]}" in
+ "!${thing#!}"|"${thing#!}")
+ OPTIONS[$i]=$thing
+ return
+ ;;
+ esac
done
- if [[ $f == false ]]; then
- BUILDENV+=('ccache')
- fi
- unset f i
+ OPTIONS+=("$thing")
+}
+
+lukeshu_set_OPTIONS debug
+
+if type ccache &>/dev/null; then
+ lukeshu_set_BUILDENV ccache
fi