diff --git a/icinga-go b/icinga-go new file mode 100755 index 0000000000000000000000000000000000000000..6b4c299728a132eb39023b096d7c328fc4ada3aa --- /dev/null +++ b/icinga-go @@ -0,0 +1,25 @@ +#!/bin/bash + +VERSION_GO="1.16.5" + +set -ex + +echo "Downloading Go Version ${VERSION_GO}" +curl -LO https://golang.org/dl/go${VERSION_GO}.linux-amd64.tar.gz + +sudo rm -rf /usr/local/go + +echo "Unpacking Go" +sudo tar -C /usr/local -xzf go${VERSION_GO}.linux-amd64.tar.gz + +echo "Deleting Go Binary Archive" +sudo rm -rf go${VERSION_GO}.linux-amd64.tar.gz + + +if [[ ! -e $HOME/.bashrc ]]; then + touch $HOME/.bashrc +fi + +echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.bashrc + +source $HOME/.bashrc