From 1565ba2beb3aae7942d0ddb9f318d418f546f15c Mon Sep 17 00:00:00 2001 From: finga Date: Wed, 6 Oct 2021 15:31:42 +0200 Subject: [PATCH] Add go paths Also improve comments. --- .zprofile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.zprofile b/.zprofile index 4509012..333b1d0 100644 --- a/.zprofile +++ b/.zprofile @@ -26,12 +26,22 @@ if [ -n "$BASH_VERSION" ]; then fi fi -# set PATH so it includes user's private bin if it exists +# if `$HOME/.local/bin` exists, add it to $PATH if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi -# set PATH so it includes user's .cargo/bin +# if `$HOME/.cargo/bin` exists, add it to $PATH if [ -d "$HOME/.cargo/bin" ] ; then PATH="$HOME/.cargo/bin:$PATH" fi + +# if `$HOME/go/bin` exists, add it to $GOPATH +if [ -d "$HOME/go/bin" ] ; then + GOPATH="$HOME/go/bin" +fi + +# if `/usr/local/go/bin` exists, add it and $GOPATH to $PATH +if [ -d "/usr/local/go/bin" ] ; then + PATH="/usr/local/go/bin:$GOPATH:$PATH" +fi