Yingdi Yu | 1cc45d9 | 2015-02-09 14:19:54 -0800 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
| 3 | set -e |
| 4 | |
| 5 | pushd /tmp >/dev/null |
| 6 | |
| 7 | INSTALLED_VERSION=$((cd ndn-cxx && git rev-parse HEAD) 2>/dev/null || echo NONE) |
| 8 | |
| 9 | sudo rm -Rf ndn-cxx-latest |
| 10 | git clone --depth 1 git://github.com/named-data/ndn-cxx ndn-cxx-latest |
| 11 | LATEST_VERSION=$((cd ndn-cxx-latest && git rev-parse HEAD) 2>/dev/null || echo UNKNOWN) |
| 12 | |
| 13 | if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then |
| 14 | sudo rm -Rf ndn-cxx |
| 15 | mv ndn-cxx-latest ndn-cxx |
| 16 | else |
| 17 | sudo rm -Rf ndn-cxx-latest |
| 18 | fi |
| 19 | |
| 20 | sudo rm -Rf /usr/local/include/ndn-cxx |
| 21 | sudo rm -f /usr/local/lib/libndn-cxx* |
| 22 | sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx* |
| 23 | |
| 24 | pushd ndn-cxx >/dev/null |
| 25 | |
Alexander Afanasyev | 7cce974 | 2015-06-10 19:28:41 -0700 | [diff] [blame^] | 26 | ./waf configure -j1 --color=yes --enable-shared --disable-static --without-osx-keychain |
Yingdi Yu | 1cc45d9 | 2015-02-09 14:19:54 -0800 | [diff] [blame] | 27 | ./waf -j1 --color=yes |
| 28 | sudo ./waf install -j1 --color=yes |
| 29 | |
| 30 | popd >/dev/null |
| 31 | popd >/dev/null |