bootstrap.sh 1.1 KB

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. if [ -n "$(git remote -v | awk '$1=="origin"{print $2}' | grep gerrithub)" ]; then
  3. echo Setting up git...
  4. curl -Lso .git/hooks/commit-msg http://review.gerrithub.io/tools/hooks/commit-msg
  5. chmod u+x .git/hooks/commit-msg
  6. # this is apparently the preferred method and might even work over HTTP
  7. # https://gerrit-review.googlesource.com/Documentation/cmd-receive-pack.html
  8. git config remote.origin.push HEAD:refs/for/master%r=rminnich@gmail.com,r=crossd@gmail.com,r=elbingmiss@gmail.com,r=anyrhine@gmail.com,r=0intro@gmail.com,r=hdonnay@gmail.com,r=john@jfloren.net,r=rafael.fernandez@taisis.com,r=keith.poole@gmail.com,r=s@sevki.org
  9. fi
  10. git submodule init
  11. git submodule update
  12. echo Building the build tool...
  13. GOBIN="$(pwd)/util" GOPATH="$(pwd)/util/third_party:$(pwd)/util" go get -d harvey/cmd/... # should really vendor these bits
  14. GOBIN="$(pwd)/util" GOPATH="$(pwd)/util/third_party:$(pwd)/util" go install github.com/rminnich/ninep/ufs harvey/cmd/...
  15. cat <<EOF
  16. Now just set your environment variables and build:
  17. source envsetup
  18. build
  19. See \`build -h' for more information on the build tool.
  20. EOF