blob: 3d87d4af7b3cf55a798fb4996f4926e8c689d7b2 [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.
Nick Gordonb9e2c652017-06-20 13:37:55 -050026sudo rm -rf ChronoSync-hotfix
27git clone git://github.com/named-data/ChronoSync ChronoSync-hotfix
Ashlesh Gawande415676b2016-12-22 00:26:23 -060028
Nick Gordonb9c5cec2017-06-08 14:10:27 -050029# LATEST_VERSION=$((cd ChronoSync-latest && git rev-parse HEAD) 2>/dev/null || echo UNKNOWN)
30
31# if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
32# sudo rm -Rf ChronoSync
33# mv ChronoSync-latest ChronoSync
34# else
35# sudo rm -Rf ChronoSync-latest
36# fi
37
Davide Pesavento6a81b772017-08-20 18:43:46 -040038sudo rm -fr /usr/local/include/ChronoSync
Ashlesh Gawande415676b2016-12-22 00:26:23 -060039sudo rm -f /usr/local/lib/libChronoSync*
40sudo rm -f /usr/local/lib/pkgconfig/ChronoSync*
41
Nick Gordonb9c5cec2017-06-08 14:10:27 -050042pushd ChronoSync-hotfix >/dev/null
43git checkout 097bb448f46b8bd9a5c1f431e824f8f6a169b650
Ashlesh Gawande415676b2016-12-22 00:26:23 -060044
45if has FreeBSD10 $NODE_LABELS; then
46 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
47fi
48
49./waf -j1 --color=yes configure
50./waf -j1 --color=yes build
Davide Pesavento6a81b772017-08-20 18:43:46 -040051sudo env "PATH=$PATH" ./waf install --color=yes
Ashlesh Gawande415676b2016-12-22 00:26:23 -060052
53popd >/dev/null
54popd >/dev/null
55
56if has Linux $NODE_LABELS; then
57 sudo ldconfig
58elif has FreeBSD10 $NODE_LABELS; then
59 sudo ldconfig -m
60fi