Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # This assumes a working thrift compiler + go environment
- # MAC: brew install golang thrift
- THIS_DIR="$(dirname "$(realpath "$0")")"
- OPENR_THRIFT="$THIS_DIR/openr_thrift"
- SRC_DIR="$(dirname "$(dirname "$(realpath "$0")")")"
- THRIFT_DIR="$SRC_DIR/terragraph-e2e/e2e/if"
- echo "REPO Base: $SRC_DIR"
- echo "Thrift Base: $THRIFT_DIR"
- if [ "$GOPATH" == "" ];
- then
- echo "I have no GOPATH set. Make it so ..."
- exit 69
- fi
- echo "-- Thrift Build --"
- for thrift_file in "$THRIFT_DIR"/*.thrift
- do
- echo "-> Thrift generating go stubs for $thrift_file"
- thrift -r -I "$OPENR_THRIFT" --gen go "$thrift_file"
- done
- mv -v gen-go/* "$GOPATH/src"
- rmdir gen-go
- # echo "Building sample_client.go"
- go build "$THIS_DIR"/sample_client.go
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement