Warn if latest version of Go is newer than installed

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2017-11-18 14:19:08 +01:00
parent dc44df273d
commit 78deaebf73
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -2,7 +2,13 @@
export PATH=/usr/local/sbin:/usr/local/bin:$PATH export PATH=/usr/local/sbin:/usr/local/bin:$PATH
## Activate go using gimme if any go version is available ## Activate go using gimme if any go version is available
[ -e ${HOME}/.gimme/envs/latest.env ] && source ${HOME}/.gimme/envs/latest.env GO_VER=$(curl -sSLf -m 2 'https://latest.luzifer.io/catalog-api/golang/latest.txt?p=version')
if [ -e "${HOME}/.gimme/envs/go${GO_VER}.env" ]; then
source "${HOME}/.gimme/envs/go${GO_VER}.env"
else
echo "Your Go version is outdated (latest would be ${GO_VER})"
source "${HOME}/.gimme/envs/latest.env"
fi
## Custom scripts ## Custom scripts
export PATH=$HOME/bin:$PATH export PATH=$HOME/bin:$PATH