aboutsummaryrefslogtreecommitdiff
path: root/scripts/build.sh
diff options
context:
space:
mode:
authoraaronbuchwald <aaron.buchwald56@gmail.com>2020-11-30 12:22:29 -0500
committerGitHub <noreply@github.com>2020-11-30 12:22:29 -0500
commitcfc11729d0f24b8e42a3f9cbcf7534e2db09d720 (patch)
tree9478961d310c5b69ca65fc9551ef9976b1d01da5 /scripts/build.sh
parentae4541f42a666fb5ae1c36d6f7423c3d9eb2c875 (diff)
parent415b1eb564efc70cf7e673358286e19de8551fbf (diff)
Merge pull request #62 from ava-labs/devv0.3.15
Dev
Diffstat (limited to 'scripts/build.sh')
-rwxr-xr-xscripts/build.sh22
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