blob: 1f7d6c1d48a1fedcb6caeb535fee3d386a1d17f4 [file] [log] [blame]
Ashlesh Gawande415676b2016-12-22 00:26:23 -06001#!/usr/bin/env bash
2set -x
3set -e
4
5JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
6source "$JDIR"/util.sh
7
8pushd /tmp >/dev/null
9
10INSTALLED_VERSION=
11if has OSX $NODE_LABELS; then
12 BOOST=$(brew ls --versions boost)
13 OLD_BOOST=$(cat boost_chrono.txt || :)
14 if [[ $OLD_BOOST != $BOOST ]]; then
15 echo "$BOOST" > boost_chrono.txt
16 INSTALLED_VERSION=NONE
17 fi
18fi
19
Nick Gordonb9c5cec2017-06-08 14:10:27 -050020# if [[ -z $INSTALLED_VERSION ]]; then
21# INSTALLED_VERSION=$((cd ChronoSync && git rev-parse HEAD) 2>/dev/null || echo NONE)
22# fi
Ashlesh Gawande415676b2016-12-22 00:26:23 -060023
24sudo rm -Rf ChronoSync-latest
Nick Gordonb9c5cec2017-06-08 14:10:27 -050025## Remove line when #3920 and #4119 merge.
26if [ ! -d "ChronoSync-hotfix" ]; then
27 git clone git://github.com/named-data/ChronoSync ChronoSync-hotfix
Ashlesh Gawande415676b2016-12-22 00:26:23 -060028fi
29
Nick Gordonb9c5cec2017-06-08 14:10:27 -050030# LATEST_VERSION=$((cd ChronoSync-latest && git rev-parse HEAD) 2>/dev/null || echo UNKNOWN)
31
32# if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
33# sudo rm -Rf ChronoSync
34# mv ChronoSync-latest ChronoSync
35# else
36# sudo rm -Rf ChronoSync-latest
37# fi
38
Ashlesh Gawande415676b2016-12-22 00:26:23 -060039sudo rm -Rf /usr/local/include/ChronoSync
40sudo rm -f /usr/local/lib/libChronoSync*
41sudo rm -f /usr/local/lib/pkgconfig/ChronoSync*
42
Nick Gordonb9c5cec2017-06-08 14:10:27 -050043pushd ChronoSync-hotfix >/dev/null
44git checkout 097bb448f46b8bd9a5c1f431e824f8f6a169b650
Ashlesh Gawande415676b2016-12-22 00:26:23 -060045
46if has FreeBSD10 $NODE_LABELS; then
47 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
48fi
49
50./waf -j1 --color=yes configure
51./waf -j1 --color=yes build
52sudo ./waf install -j1 --color=yes
53
54popd >/dev/null
55popd >/dev/null
56
57if has Linux $NODE_LABELS; then
58 sudo ldconfig
59elif has FreeBSD10 $NODE_LABELS; then
60 sudo ldconfig -m
61fi