#!/bin/sh set -e PROTOC_GO_PLUGIN="google.golang.org/protobuf/cmd/protoc-gen-go@latest" script="$(realpath "$0")" scripts="$(dirname "$script")" iot_core="$(dirname "$scripts")" proto="${iot_core}/iot-protocol/proto" software="${iot_core}/software" go_binaries="${HOME}/go/bin" generate_go_code() { go install "$PROTOC_GO_PLUGIN" export PATH="${PATH}:${go_binaries}" protoc --proto_path="$proto" --go_out="$software" discovery.proto } generate_go_code