summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2020-02-21 11:01:20 +0100
committerPeter Palfrader <peter@palfrader.org>2020-02-21 11:01:20 +0100
commit04d4df7ba1efea3a2a083528061bbc02801e47da (patch)
tree649b87469578c11c0dbdbcdeae952f029b96a01e
parent9059e67cfade53526528139ff4d1d8762494d299 (diff)
Only add ccache to PATH if ~/.ccache is not a dangling symlink
-rw-r--r--zshrc6
1 files changed, 5 insertions, 1 deletions
diff --git a/zshrc b/zshrc
index 88ea6ff..bad6c9f 100644
--- a/zshrc
+++ b/zshrc
@@ -128,7 +128,11 @@ typeset -U fpath
path=(
"$HOME/bin"
"$HOME/local/bin"
- /usr/lib/ccache
+)
+if [ -e "$HOME/.ccache" ] || ! [ -L "$HOME/.ccache" ]; then
+ path+=( /usr/lib/ccache )
+fi
+path+=(
/usr/local/bin
/usr/bin
/usr/local/CAME/bin