1if [[ -z `which go` ]]; then
2  echo "Please install Go before running the server."
3  exit 1
4fi
5
6if [[ -z "$GOPATH" ]]; then
7  echo "GOPATH environment variable is not set. Please see"
8  echo "http://golang.org/doc/code.html#GOPATH for more information."
9  exit 1
10fi
11
12go get github.com/gorilla/securecookie
13go get code.google.com/p/goauth2/oauth
14
15DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
16cd $DIR
17
18if [[ ! -f oauth_client_secret.json ]]; then
19  gsutil cp gs://chromium-skia-gm/bugchomper/oauth_client_secret.json .
20fi
21
22GOPATH="$GOPATH:$DIR" go run $DIR/src/server/server.go $@
23
24