aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Buttolph <stephen@avalabs.org>2020-10-30 17:29:21 -0400
committerGitHub <noreply@github.com>2020-10-30 17:29:21 -0400
commitc613e21ea107e8369926f4b53b7830a9d5dabf18 (patch)
tree7fbd50b5628c6f687d7c5e68886b8f39fa135481 /scripts
parent806d04e9aa4b6e22fc2a484ada6fecb0c9a348e3 (diff)
parenta6ffdbbdd269fae35c5600e954bd373b619fe733 (diff)
Merge pull request #45 from ava-labs/handle-config
Parse config to set enabled APIs
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_coreth.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/build_coreth.sh b/scripts/build_coreth.sh
new file mode 100755
index 0000000..41fab1b
--- /dev/null
+++ b/scripts/build_coreth.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