2014-05-13 18:03:45 +00:00
|
|
|
if [[ -z `which go` ]]; then
|
|
|
|
echo "Please install Go before running the server."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-05-14 15:42:14 +00:00
|
|
|
if [[ -z "$GOPATH" ]]; then
|
|
|
|
echo "GOPATH environment variable is not set. Please see"
|
|
|
|
echo "http://golang.org/doc/code.html#GOPATH for more information."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-05-13 18:03:45 +00:00
|
|
|
go get github.com/gorilla/securecookie
|
2014-05-14 16:57:49 +00:00
|
|
|
go get code.google.com/p/goauth2/oauth
|
2014-05-13 18:03:45 +00:00
|
|
|
|
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
cd $DIR
|
2014-05-13 19:18:55 +00:00
|
|
|
|
|
|
|
if [[ ! -f oauth_client_secret.json ]]; then
|
|
|
|
gsutil cp gs://chromium-skia-gm/bugchomper/oauth_client_secret.json .
|
|
|
|
fi
|
|
|
|
|
2014-05-13 18:03:45 +00:00
|
|
|
GOPATH="$GOPATH:$DIR" go run $DIR/src/server/server.go $@
|
|
|
|
|