build.sh 525 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. set -eru -o pipefail
  3. # exit on error
  4. # exit on uninitialized variables
  5. # enter restricted shell https://www.gnu.org/s/bash/manual/html_node/The-Restricted-Shell.html
  6. URL='https://redirector.gvt1.com/edgedl/go/go1.9.2.src.tar.gz'
  7. curl -L --silent "$URL" -o "go.tar.gz"
  8. tar -zxf "go.tar.gz"
  9. rm -rf "html/template/*"
  10. cp "go/LICENSE" "./"
  11. cp "go/PATENTS" "./"
  12. cp "go/VERSION" "./"
  13. cp -a "go/src/html/template/" "html/template/"
  14. cp "export.go.tpl" "html/template/export.go"
  15. rm -f "go.tar.gz"
  16. rm -rf "./go/"