blob: 4b0ee2b7672bbc0f7bb2ae48b646eaa35d57591e [file] [log] [blame]
Chengyu Fan27887552015-03-26 17:12:00 -06001#!/usr/bin/env bash
2set -x
3set -e
4
5pushd /tmp >/dev/null
6
7INSTALLED_VERSION=$((cd ChronoSync && git rev-parse HEAD) 2>/dev/null || echo NONE)
8
9sudo rm -Rf ChronoSync-latest
10git clone --depth 1 git://github.com/named-data/ChronoSync ChronoSync-latest
11LATEST_VERSION=$((cd ChronoSync-latest && git rev-parse HEAD) 2>/dev/null || echo UNKNOWN)
12
13if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
14 sudo rm -Rf ChronoSync
15 mv ChronoSync-latest ChronoSync
16else
17 sudo rm -Rf ChronoSync-latest
18fi
19
20sudo rm -Rf /usr/local/include/ChronoSync
21sudo rm -f /usr/local/lib/libChronoSync*
22sudo rm -f /usr/local/lib/pkgconfig/ChronoSync*
23
24pushd ChronoSync >/dev/null
25
26export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:\
27/usr/local/lib32/pkgconfig:\
28/usr/local/lib64/pkgconfig
29
Chengyu Fanc7b87ad2015-07-09 16:44:37 -060030sudo ldconfig || true
Chengyu Fan27887552015-03-26 17:12:00 -060031./waf configure -j1 --color=yes
32./waf -j1 --color=yes
33sudo ./waf install -j1 --color=yes
34
35popd >/dev/null
36popd >/dev/null