bootstrap.sh 1.1 KB

123456789101112131415161718192021222324252627
  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 harvey/cmd/...
  15. # this will make booting a VM easier
  16. mkdir -p tmp
  17. cat <<EOF
  18. Now just set your environment variables and build:
  19. source envsetup
  20. build
  21. See \`build -h' for more information on the build tool.
  22. EOF