-
Notifications
You must be signed in to change notification settings - Fork 4
/
install.sh
44 lines (32 loc) · 1.04 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
set -e
# Python dependencies
pip install lark pre-commit tomli tomli_w colorlog rich kubernetes pyyaml
if [ -z "${APPNET_DIR}" ]; then
echo "Setting APPNET_DIR to current directory"
echo "export APPNET_DIR=$PWD" >> ~/.bashrc
. ~/.bashrc
fi
GO_PATH=$(go env GOPATH)
GO_BIN_DIR=$(go env GOPATH)/bin
echo "export PATH=$PATH:$GO_BIN_DIR" >> ~/.bashrc
echo "export GOPATH=$GO_PATH" >> ~/.bashrc
. ~/.bashrc
echo "Building appnetctl..."
cd $APPNET_DIR/appnetctl
go install
cd $APPNET_DIR
echo "appnetctl was successfully installed 🎉🎉🎉"
echo ""
echo "Installing Rust Dependencies"
cargo install cargo-wasi
rustup target add wasm32-wasi
go install golang.org/x/tools/cmd/goimports@latest
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
# Create folder for appnet binaries
mkdir -p /tmp/appnet
mkdir -p /tmp/appnet/shard-manager
cp $APPNET_DIR/utils/shardmanager/samples/example_shard.yaml /tmp/appnet/shard-manager
echo 1 > /tmp/appnet/config-version
set +e