circle-installgo.sh 718 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. set -euo pipefail
  3. [ -d ~/go1.5 ] && exit
  4. # Install the version of Go that we want
  5. curl -s https://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gz \
  6. | tar -C ~ --transform s/go/go1.5/ -zx
  7. # Build the standard library for all our cross compilation targets. We do that
  8. # here so that it gets cached and we don't need to repeat it for every build.
  9. for GOOS in darwin dragonfly solaris; do
  10. export GOOS
  11. export GOARCH=amd64
  12. echo $GOOS $GOARCH
  13. go install std
  14. done
  15. for GOOS in freebsd linux netbsd openbsd windows; do
  16. for GOARCH in amd64 386; do
  17. export GOOS
  18. export GOARCH
  19. echo $GOOS $GOARCH
  20. go install std
  21. done
  22. done
  23. export GOOS=linux
  24. export GOARCH=arm
  25. echo $GOOS $GOARCH
  26. go install std