You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

install.sh 774B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. set -e
  3. if [ -z "$GOPATH" ]; then
  4. echo Error: \$GOPATH is unset
  5. echo See https://golang.org/doc/code.html for details, or try these steps:
  6. printf "\tmkdir -p ~/go\n"
  7. printf "\texport GOPATH=~/go\n"
  8. exit 1
  9. fi
  10. EXPECTED_DIR=${GOPATH}/src/github.com/oragono/oragono
  11. if [ "$PWD" != "$EXPECTED_DIR" ] ; then
  12. echo Error: working directory is not where \$GOPATH expects it to be
  13. echo "Expected: $EXPECTED_DIR"
  14. echo "Actual: $PWD"
  15. echo See https://golang.org/doc/code.html for details, or try these steps:
  16. printf "\tmkdir -p %s/src/github.com/oragono\n" "$GOPATH"
  17. printf "\tcd %s/src/github.com/oragono\n" "$GOPATH"
  18. printf "\tmv %s oragono\n" "$PWD"
  19. printf "\tcd oragono\n"
  20. exit 1
  21. fi
  22. go install -v
  23. echo successfully installed as "${GOPATH}/bin/oragono"