blob: 9cd88f4ad3d933c4de11ec549c067acf96a5caba [file] [log] [blame]
Chengyu Fan27887552015-03-26 17:12:00 -06001#!/usr/bin/env bash
2set -e
3
4JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
6
7if has OSX $NODE_LABELS; then
8 set -x
9 brew update
10 brew upgrade
Chengyu Fan31737f12016-01-12 21:08:50 -070011 brew install boost sqlite3 pkg-config mysql jsoncpp libzdb
Chengyu Fan27887552015-03-26 17:12:00 -060012 brew cleanup
13fi
14
15if has Ubuntu $NODE_LABELS; then
16 BOOST_PKG=libboost-all-dev
Chengyu Fan31737f12016-01-12 21:08:50 -070017 ZDB_PKG=libzdb-dev
Chengyu Fan27887552015-03-26 17:12:00 -060018 if has Ubuntu-12.04 $NODE_LABELS; then
19 BOOST_PKG=libboost1.48-all-dev
Chengyu Fan31737f12016-01-12 21:08:50 -070020 unset ZDB_PKG
21 sudo apt-get update -qq -y
22 sudo apt-get -qq -y install autoconf libtool re2c
23 pushd /tmp >/dev/null
24 sudo rm -Rf libzdb
25 git clone https://bitbucket.org/tildeslash/libzdb.git
26 pushd libzdb >/dev/null
27 git checkout -b 3-1 release-3-1
28 ./bootstrap
29 ./configure
30 make
31 sudo make install
32 popd >/dev/null
33 popd >/dev/null
Chengyu Fan27887552015-03-26 17:12:00 -060034 fi
35
36 set -x
37 sudo apt-get update -qq -y
38 sudo apt-get -qq -y install build-essential pkg-config $BOOST_PKG libssl-dev \
Chengyu Fanb25835b2015-04-28 17:09:35 -060039 libcrypto++-dev libsqlite3-dev libmysqlclient-dev \
Chengyu Fan31737f12016-01-12 21:08:50 -070040 libjsoncpp-dev protobuf-compiler libprotobuf-dev $ZDB_PKG
Chengyu Fan27887552015-03-26 17:12:00 -060041fi