]> arthur.barton.de Git - ax-zsh.git/blob - plugins/ccache/ccache.zprofile
P10k: Read config after enabling instant prompt
[ax-zsh.git] / plugins / ccache / ccache.zprofile
1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # ccache.zprofile: Setup CCache environment
3
4 # Make sure that "ccache(1)" is installed
5 (( $+commands[ccache] )) || return
6
7 # Setup cache location
8 export CCACHE_DIR="$XDG_CACHE_HOME/ccache"
9
10 # Search for directory with wrapper commands and prepend it to "PATH"
11 for dir (
12         /usr/local/opt/ccache/libexec
13         /usr/local/lib/ccache
14         /opt/ccache/libexec
15         /usr/libexec/ccache
16         /usr/lib/ccache
17 ); do
18         if [[ -d "$dir" ]]; then
19                 PATH="$dir:$PATH"
20                 break
21         fi
22 done
23 unset dir