Advertisement
neggles

go autoinstall

Dec 2nd, 2020 (edited)
1,871
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.49 KB | None | 0 0
  1. #!/bin/bash
  2. # Raspberry Pi golang install script
  3. # Based on instructions from https://www.e-tinkers.com/2019/06/better-way-to-install-golang-go-on-raspberry-pi/
  4.  
  5. export GOLANG="$(curl https://golang.org/dl/|grep armv6l|grep -v beta|head -1|awk -F\> {'print $3'}|awk -F\< {'print $1'})"
  6. wget https://golang.org/dl/$GOLANG
  7. sudo tar -C /usr/local -xzf $GOLANG
  8. rm $GOLANG
  9. unset GOLANG
  10.  
  11. echo 'PATH=$PATH:/usr/local/go/bin' >> ~/.profile
  12. echo 'GOPATH=$HOME/golang' >> ~/.profile
  13. source ~/.profile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement