-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sh
executable file
·24 lines (18 loc) · 944 Bytes
/
build.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
#!/bin/bash
# setup build dependencies
sudo apt-get install python-pip -y
sudo apt-get install python3-distutils -y
# setup bazel
sudo apt install apt-transport-https curl gnupg -y
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
sudo mv bazel-archive-keyring.gpg /usr/share/keyrings
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
sudo apt update && sudo apt install bazel-6.4.0 -y
# make sure these are in /usr/bin/
sudo update-alternatives --install /usr/bin/bazel bazel /usr/bin/bazel-6.4.0 10
sudo update-alternatives --install /usr/bin/tc tc /usr/sbin/tc 10
# emp-toolkit
wget https://raw.githubusercontent.com/emp-toolkit/emp-readme/master/scripts/install.py
python install.py --deps --tool --ot --sh2pc
# and build the project
bazel build //upsi:all