Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame^] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
| 3 | set -e |
| 4 | |
| 5 | cd /tmp |
| 6 | BUILD="no" |
| 7 | if [ ! -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" |
| 13 | else |
| 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 |
| 31 | fi |
| 32 | |
| 33 | sudo rm -Rf /usr/local/include/ndn-cxx |
| 34 | sudo rm -f /usr/local/lib/libndn-cxx* |
| 35 | sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx* |
| 36 | |
| 37 | if [ "$BUILD" = "yes" ]; then |
| 38 | sudo ./waf distclean -j1 --color=yes |
| 39 | fi |
| 40 | |
| 41 | ./waf configure -j1 --color=yes --without-osx-keychain |
| 42 | ./waf -j1 --color=yes |
| 43 | sudo ./waf install -j1 --color=yes |