Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rehacktive/d86806f60652fdbc022ab58c1150f33b to your computer and use it in GitHub Desktop.
Save rehacktive/d86806f60652fdbc022ab58c1150f33b to your computer and use it in GitHub Desktop.
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