-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdo_install.sh
executable file
·41 lines (32 loc) · 1003 Bytes
/
do_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
#!/bin/bash
# exit when any command fails
set -e
# fetch submodules and update apt
echo "Initializing submodules..."
git submodule update --init --recursive
sudo apt-get update
SRC_DIR="$(pwd)"
echo "Installing P4C dependencies..."
# Install pip and python
sudo apt install -y python3
sudo apt install -y python3-pip
sudo apt install -y python3-setuptools
# Install the p4 compiler dependencies
sudo apt install -y bison \
build-essential \
cmake \
git \
flex \
libboost-dev \
libboost-graph-dev \
libboost-iostreams-dev \
libfl-dev \
libgc-dev \
libgmp-dev \
pkg-config
# install python packages using pip
pip3 install --user wheel
pip3 install --user pyroute2 ipaddr ply scapy
# Style checks.
sudo apt install -y clang-tidy
echo "Successfully installed P4C dependencies."