diff options
author | aaronbuchwald <[email protected]> | 2020-11-30 12:22:29 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-30 12:22:29 -0500 |
commit | cfc11729d0f24b8e42a3f9cbcf7534e2db09d720 (patch) | |
tree | 9478961d310c5b69ca65fc9551ef9976b1d01da5 /scripts/build.sh | |
parent | ae4541f42a666fb5ae1c36d6f7423c3d9eb2c875 (diff) | |
parent | 415b1eb564efc70cf7e673358286e19de8551fbf (diff) |
Merge pull request #62 from ava-labs/devv0.3.15
Dev
Diffstat (limited to 'scripts/build.sh')
-rwxr-xr-x | scripts/build.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..41fab1b --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail + +# Set GOPATH +GOPATH="$(go env GOPATH)" + +# Set default binary location +BINARY_PATH="$GOPATH/src/github.com/ava-labs/avalanchego/build/plugins/evm" + +if [[ $# -eq 1 ]]; then + BINARY_PATH=$1 +elif [[ $# -ne 0 ]]; then + echo "Invalid arguments to build coreth. Requires either no arguments (default) or one arguments to specify binary location." + exit 1 +fi + +# Build Coreth, which is run as a subprocess +echo "Building Coreth..." +go build -o "$BINARY_PATH" "plugin/"*.go |