Warn if latest version of Go is newer than installed
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
dc44df273d
commit
78deaebf73
1 changed files with 7 additions and 1 deletions
|
@ -2,7 +2,13 @@
|
|||
export PATH=/usr/local/sbin:/usr/local/bin:$PATH
|
||||
|
||||
## 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
|
||||
export PATH=$HOME/bin:$PATH
|
||||
|
|
Loading…
Reference in a new issue