blob: 50318d4ed0d4dca6409d6923bc9fe612a10ef101 [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
30./waf configure -j1 --color=yes
31./waf -j1 --color=yes
32sudo ./waf install -j1 --color=yes
33
34popd >/dev/null
35popd >/dev/null