Skip to content

Instantly share code, notes, and snippets.

@pajlada
Created March 9, 2017 19:26
Show Gist options
  • Save pajlada/acaf8e53b21364a785397cd75922467a to your computer and use it in GitHub Desktop.
Save pajlada/acaf8e53b21364a785397cd75922467a to your computer and use it in GitHub Desktop.
if [[ -n "${CURRENT_ACTIVATED_SCRIPT+1}" ]]; then
echo "already activated"
return
fi
export OLD_GOPATH="${GOPATH}"
export GOPATH="/home/pajbot/go"
export OLD_PS1="${PS1}"
export PS1="(pb) ${PS1}"
export CURRENT_ACTIVATED_SCRIPT="pb-go"
if [[ ! -n "${CURRENT_ACTIVATED_SCRIPT+1}" ]]; then
echo "not activated. call source activate yet"
return
fi
export GOPATH="${OLD_GOPATH}"
unset OLD_GOPATH
export PS1="${OLD_PS1}"
unset OLD_PS1
unset CURRENT_ACTIVATED_SCRIPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment