From: Alexander Barton Date: Fri, 27 Mar 2015 15:44:40 +0000 (+0100) Subject: "ccache" plugin: Assume that ccache is installed when plugin is used X-Git-Url: https://arthur.barton.de/gitweb/?p=OhMyZshExtensions.git;a=commitdiff_plain;h=a90f65090215fee43016b8bb9d42829d1b419717;hp=d610e4703d330893ecc03ae30a8ca51755505aad;ds=sidebyside "ccache" plugin: Assume that ccache is installed when plugin is used --- 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