From a90f65090215fee43016b8bb9d42829d1b419717 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Fri, 27 Mar 2015 16:44:40 +0100 Subject: [PATCH] "ccache" plugin: Assume that ccache is installed when plugin is used --- plugins/ccache/ccache.plugin.zsh | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/plugins/ccache/ccache.plugin.zsh b/plugins/ccache/ccache.plugin.zsh index d4d5850..a3e23fc 100644 --- a/plugins/ccache/ccache.plugin.zsh +++ b/plugins/ccache/ccache.plugin.zsh @@ -1,21 +1,19 @@ # ccache.plugin.zsh # 2015-03-27, alex@barton.de -if type ccache >/dev/null; then - # Setup environment for ccache, if installed - export CCACHE_DIR="$XDG_CACHE_HOME/ccache" +# Setup environment for ccache, if installed +export CCACHE_DIR="$XDG_CACHE_HOME/ccache" - # Search for directory with wrapper commands and prepend it to "PATH" - for d in \ - /usr/local/opt/ccache/libexec \ - /usr/local/lib/ccache \ - /opt/ccache/libexec \ - /usr/libexec/ccache \ - /usr/lib/ccache \ - ; do - if [ -d "$d" ]; then - PATH="$d:$PATH" - break - fi - done -fi +# Search for directory with wrapper commands and prepend it to "PATH" +for d in \ + /usr/local/opt/ccache/libexec \ + /usr/local/lib/ccache \ + /opt/ccache/libexec \ + /usr/libexec/ccache \ + /usr/lib/ccache \ +; do + if [ -d "$d" ]; then + PATH="$d:$PATH" + break + fi +done -- 2.39.2