blob: 465e291e990f6d2e5e6ab2c55be5a732c8595438 [file] [log] [blame]
Alexander Afanasyev21034bf2014-09-02 18:31:53 -07001#!/usr/bin/env bash
2set -x
3
4cd /tmp
5BUILD="no"
6if [ ! -d ndn-cxx ]; then
7 git clone --depth 1 git://github.com/named-data/ndn-cxx
8 cd ndn-cxx
9 BUILD="yes"
10else
11 cd ndn-cxx
12 INSTALLED_VERSION=`git rev-parse HEAD || echo NONE`
13 sudo rm -Rf latest-version
14 git clone --depth 1 git://github.com/named-data/ndn-cxx latest-version
15 cd latest-version
16 LATEST_VERSION=`git rev-parse HEAD || echo UNKNOWN`
17 cd ..
18 rm -Rf latest-version
19 if [ "$INSTALLED_VERSION" != "$LATEST_VERSION" ]; then
20 cd ..
21 sudo rm -Rf ndn-cxx
22 git clone --depth 1 git://github.com/named-data/ndn-cxx
23 cd ndn-cxx
24 BUILD="yes"
25 fi
26fi
27
28sudo rm -Rf /usr/local/include/ndn-cxx
29sudo rm -f /usr/local/lib/libndn-cxx*
30sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx*
31
32if [ "$BUILD" = "yes" ]; then
33 ./waf distclean --color=yes
34fi
35
36./waf configure --color=yes --without-osx-keychain
37./waf -j1 --color=yes
38sudo ./waf install --color=yes