blob: 2f139cda5d739719f87fad701993c306fb7639c0 [file] [log] [blame]
Wentao Shanga8f3c402014-10-30 14:03:27 -07001#!/usr/bin/env bash
2set -x
3set -e
4
5cd /tmp
6BUILD="no"
7if [ ! -d NFD ]; then
8 git clone --recursive --depth 1 git://github.com/named-data/NFD
9 cd NFD
10 BUILD="yes"
11else
12 cd NFD
13 INSTALLED_VERSION=`git rev-parse HEAD || echo NONE`
14 sudo rm -Rf latest-version
15 git clone --recursive --depth 1 git://github.com/named-data/NFD latest-version
16 cd latest-version
17 LATEST_VERSION=`git rev-parse HEAD || echo UNKNOWN`
18 cd ..
19 rm -Rf latest-version
20 if [ "$INSTALLED_VERSION" != "$LATEST_VERSION" ]; then
21 cd ..
22 sudo rm -Rf NFD
23 git clone --recursive --depth 1 git://github.com/named-data/NFD
24 cd NFD
25 BUILD="yes"
26 fi
27fi
28
29if [ "$BUILD" = "yes" ]; then
30 sudo ./waf -j1 --color=yes distclean
31fi
32
33git submodule update --init
34
35./waf configure -j1 --color=yes
36./waf -j1 --color=yes
37sudo ./waf install -j1 --color=yes