Alexander Afanasyev | bc98fcf | 2014-08-16 23:18:50 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
Vince Lehman | 0a7da61 | 2014-10-29 14:39:29 -0500 | [diff] [blame] | 3 | set -e |
Alexander Afanasyev | bc98fcf | 2014-08-16 23:18:50 -0700 | [diff] [blame] | 4 | |
Alexander Afanasyev | f9f3910 | 2015-12-01 17:43:40 -0800 | [diff] [blame^] | 5 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 6 | source "$JDIR"/util.sh |
| 7 | |
Alexander Afanasyev | 24ed83a | 2015-03-30 11:06:50 -0700 | [diff] [blame] | 8 | pushd /tmp >/dev/null |
| 9 | |
Alexander Afanasyev | f9f3910 | 2015-12-01 17:43:40 -0800 | [diff] [blame^] | 10 | NDN_CXX_FOLDER=ndn-cxx-0.4.0-beta2-11-ge3e2505 |
Alexander Afanasyev | 24ed83a | 2015-03-30 11:06:50 -0700 | [diff] [blame] | 11 | |
Alexander Afanasyev | f9f3910 | 2015-12-01 17:43:40 -0800 | [diff] [blame^] | 12 | sudo rm -Rf "$NDN_CXX_FOLDER" |
Alexander Afanasyev | bc98fcf | 2014-08-16 23:18:50 -0700 | [diff] [blame] | 13 | |
| 14 | sudo rm -Rf /usr/local/include/ndn-cxx |
| 15 | sudo rm -f /usr/local/lib/libndn-cxx* |
| 16 | sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx* |
| 17 | |
Alexander Afanasyev | f9f3910 | 2015-12-01 17:43:40 -0800 | [diff] [blame^] | 18 | mkdir "$NDN_CXX_FOLDER" |
| 19 | pushd "$NDN_CXX_FOLDER" > /dev/null |
Alexander Afanasyev | bc98fcf | 2014-08-16 23:18:50 -0700 | [diff] [blame] | 20 | |
Alexander Afanasyev | f9f3910 | 2015-12-01 17:43:40 -0800 | [diff] [blame^] | 21 | git init |
| 22 | git fetch https://github.com/named-data/ndn-cxx master && git checkout e3e2505aa03e0b298e1a8dfc9876f1f8dafcaaba |
| 23 | |
| 24 | ./waf configure -j1 --color=yes --enable-shared --disable-static --without-osx-keychain |
Alexander Afanasyev | bc98fcf | 2014-08-16 23:18:50 -0700 | [diff] [blame] | 25 | ./waf -j1 --color=yes |
Alexander Afanasyev | 24ed83a | 2015-03-30 11:06:50 -0700 | [diff] [blame] | 26 | sudo ./waf install -j1 --color=yes |
| 27 | |
| 28 | popd >/dev/null |
| 29 | popd >/dev/null |
Alexander Afanasyev | f9f3910 | 2015-12-01 17:43:40 -0800 | [diff] [blame^] | 30 | |
| 31 | if has Linux $NODE_LABELS; then |
| 32 | sudo ldconfig |
| 33 | elif has FreeBSD $NODE_LABELS; then |
| 34 | sudo ldconfig -a |
| 35 | fi |