diff --git a/zshenv b/zshenv index 46cf512..662c9a8 100644 --- a/zshenv +++ b/zshenv @@ -22,10 +22,17 @@ INFOPATH=$HOME/.local/share/info:$INFOPATH # Add ccache compiler aliases to PATH and use XDG base dir paths if [ `uname` = Darwin ]; then - [ -d /usr/local/opt/python/libexec/bin ] && \ - PATH=/usr/local/opt/python/libexec/bin:$PATH - [ -f /usr/local/bin/ccache ] && \ - PATH=/usr/local/opt/ccache/libexec:$PATH + if [ `uname -m` = arm64 ]; then + homebrew_root=/opt/homebrew + [ -d /opt/homebrew/bin ] && \ + PATH=$homebrew_root/bin:$PATH + else + homebrew_root=/usr/local + fi + [ -d $homebrew_root/opt/python/libexec/bin ] && \ + PATH=$homebrew_root/opt/python/libexec/bin:$PATH + [ -f $homebrew_root/bin/ccache ] && \ + PATH=$homebrew_root/opt/ccache/libexec:$PATH elif [ -f /usr/bin/ccache ]; then if [ -d /usr/lib/ccache/bin ]; then PATH=/usr/lib/ccache/bin:$PATH