From 551f80ef29e4925dcd68393b386ec94d906a616b Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Sun, 9 Jan 2022 16:52:56 +0800 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B0=20golang?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/200-golang.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/install/200-golang.sh b/install/200-golang.sh index 7ab7a50..f226ce8 100755 --- a/install/200-golang.sh +++ b/install/200-golang.sh @@ -1,27 +1,28 @@ #!/bin/bash -. "../src/01-common.sh" || exit 5 -title "Installing golang" +echo +echo "===============================================" +echo "Installing golang..." +echo "===============================================" +echo +# https://go.dev/dl/ # https://golang.org/doc/install # https://www.vultr.com/docs/install-the-latest-version-of-golang-on-ubuntu -# if [ "$EUID" -ne 0 ] -# then echo "*** root permissions required ***" -# exit -# fi - -[ $1 ] && VERSION="$1" || VERSION="1.17.5" +[ $1 ] && VERSION="$1" || VERSION="1.17.6" FILE="go$VERSION.linux-amd64.tar.gz" sudo rm -rf /usr/local/go wget "https://golang.org/dl/$FILE" -O /tmp/$FILE sudo tar -xzf $FILE -C /usr/local rm -rf /tmp/$FILE -sudo chown $USER: -R /usr/local/go +sudo chown anthony: -R /usr/local/go echo "export PATH=$PATH:/usr/local/go/bin" >> /home/anthony/.profile echo "export GOPATH=~/.go" >> /home/anthony/.profile # source ~/.profile -success "$(go version)" -info "NOTE: now run \`source ~/.profile\` to apply new env vars" +echo +go version +echo "NOTE: now run 'source ~/.profile' to apply new env vars" +echo \ No newline at end of file