Skip to content

Instantly share code, notes, and snippets.

@cyppst
Created January 12, 2020 14:29
Show Gist options
  • Save cyppst/0c8208987b408a4303974d656ce42222 to your computer and use it in GitHub Desktop.
Save cyppst/0c8208987b408a4303974d656ce42222 to your computer and use it in GitHub Desktop.
golang-setup.sh
url=`curl https://golang.org/dl/ | grep armv6l | sort --version-sort | tail -1 | grep -o -E https://dl.google.com/go/go[0-9]+\.[0-9]+((\.[0-9]+)?).linux-armv6l.tar.gz`
wget ${url}
sudo tar -C /usr/local -xvf `echo ${url} | cut -d '/' -f5`
cat >> ~/.bashrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
EOF
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment