blob: 12e3eb285cb2894d46678ae5e29cc54aca1ace38 [file] [log] [blame]
Alexander Afanasyev8e60bcd2015-01-15 20:55:40 +00001#!/usr/bin/env bash
2set -x
3set -e
4
5cd /tmp
6BUILD="no"
7if [ ! -d ndn-cxx ]; then
8 git clone git://github.com/named-data/ndn-cxx
9 cd ndn-cxx
10 # TEMPORARY, the following must be removed after issue if fixed
11 git checkout 81a6c5dea60cea97c60dab0d78576c0d3b4e29ed
12 BUILD="yes"
13else
14 cd ndn-cxx
15 INSTALLED_VERSION=`git rev-parse HEAD || echo NONE`
16 sudo rm -Rf latest-version
17 git clone git://github.com/named-data/ndn-cxx latest-version
18 cd latest-version
19 # TEMPORARY, the following must be removed after issue if fixed
20 git checkout 81a6c5dea60cea97c60dab0d78576c0d3b4e29ed
21 LATEST_VERSION=`git rev-parse HEAD || echo UNKNOWN`
22 cd ..
23 rm -Rf latest-version
24 if [ "$INSTALLED_VERSION" != "$LATEST_VERSION" ]; then
25 cd ..
26 sudo rm -Rf ndn-cxx
27 git clone --depth 1 git://github.com/named-data/ndn-cxx
28 cd ndn-cxx
29 BUILD="yes"
30 fi
31fi
32
33sudo rm -Rf /usr/local/include/ndn-cxx
34sudo rm -f /usr/local/lib/libndn-cxx*
35sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx*
36
37if [ "$BUILD" = "yes" ]; then
38 sudo ./waf distclean -j1 --color=yes
39fi
40
41./waf configure -j1 --color=yes --without-osx-keychain
42./waf -j1 --color=yes
43sudo ./waf install -j1 --color=yes