#!/bin/sh echo "0. Ensure that protoc is installed." if which protoc; then echo "OK" else echo "Please install protoc and be sure that it is in your search path." exit fi echo "1. Set gopath and search path" export GOPATH=`pwd`/go export PATH=$GOPATH/bin:$PATH echo "2. Get the Go plugin for protoc" go get -a github.com/golang/protobuf/protoc-gen-go echo "3. Run protoc to generate the test API code" mkdir -p go/src/sample protoc sample.proto --proto_path=. --go_out=plugins=grpc:go/src/sample -osample.out echo "4. Get the writer dependencies" go get writer echo "5. Build the writer" go build writer