forked from facebook/fboss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetdeps.sh
executable file
·53 lines (48 loc) · 1.4 KB
/
getdeps.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
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
function update() {
repo=`basename $1 .git`
echo "updating $repo..."
if [ -d $repo ]; then
(cd $repo && git pull)
else
git clone $1
git checkout $2
fi
}
function update_branch() {
branch="$1"
if [ "$(git symbolic-ref -q --short HEAD)" != "OpenNSL_6.3" ]; then
git checkout -tb "$branch" "origin/$branch"
fi
}
function build() {
(
echo "building $1..."
cd $1
if [ ! -x ./configure ]; then
autoreconf --install
./configure
fi
make -j8
)
}
echo "installing packages"
sudo apt-get install -yq autoconf automake libdouble-conversion-dev \
libssl-dev make zip git autoconf libtool g++ libboost-all-dev \
libevent-dev flex bison libgoogle-glog-dev scons libkrb5-dev \
libsnappy-dev libsasl2-dev libnuma-dev libi2c-dev libcurl4-nss-dev
echo "creating external..."
mkdir -p external
(
cd external
update https://github.com/Broadcom-Switch/OpenNSL.git
(cd OpenNSL && update_branch OpenNSL_6.3)
update \
git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
update https://github.com/facebook/folly.git
update https://github.com/facebook/fbthrift.git
build iproute2 v3.12.0
build folly/folly v0.48.0
export CPPFLAGS=" -I`pwd`/folly/" LDFLAGS="-L`pwd`/folly/folly/.libs/"
build fbthrift/thrift v0.28.0
)