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 | |
Ashlesh Gawande | 812af97 | 2017-04-21 09:26:37 -0500 | [diff] [blame] | 10 | INSTALLED_VERSION= |
| 11 | if has OSX $NODE_LABELS; then |
| 12 | BOOST=$(brew ls --versions boost) |
| 13 | OLD_BOOST=$(cat boost.txt || :) |
| 14 | if [[ $OLD_BOOST != $BOOST ]]; then |
| 15 | echo "$BOOST" > boost.txt |
| 16 | INSTALLED_VERSION=NONE |
| 17 | fi |
| 18 | fi |
| 19 | |
Nick Gordon | b9c5cec | 2017-06-08 14:10:27 -0500 | [diff] [blame] | 20 | ## Uncomment when #3920 and #4119 merge. |
| 21 | # if [[ -z $INSTALLED_VERSION ]]; then |
| 22 | # INSTALLED_VERSION=$((cd ndn-cxx && git rev-parse HEAD) 2>/dev/null || echo NONE) |
| 23 | # fi |
Alexander Afanasyev | 24ed83a | 2015-03-30 11:06:50 -0700 | [diff] [blame] | 24 | |
Muktadir R Chowdhury | 4c7caad | 2015-09-03 15:49:22 -0500 | [diff] [blame] | 25 | sudo rm -Rf ndn-cxx-latest |
Nick Gordon | b9c5cec | 2017-06-08 14:10:27 -0500 | [diff] [blame] | 26 | ## Remove this when #3920 and #4119 merge |
Nick Gordon | a75fdb2 | 2017-07-06 14:10:43 -0500 | [diff] [blame^] | 27 | sudo rm -Rf ndn-cxx-hotfix |
| 28 | git clone git://github.com/named-data/ndn-cxx ndn-cxx-hotfix |
| 29 | |
Alexander Afanasyev | bc98fcf | 2014-08-16 23:18:50 -0700 | [diff] [blame] | 30 | |
Nick Gordon | b9c5cec | 2017-06-08 14:10:27 -0500 | [diff] [blame] | 31 | ## Uncomment when #3920 and #4119 merge. |
| 32 | # LATEST_VERSION=$((cd ndn-cxx-latest && git rev-parse HEAD) 2>/dev/null || echo UNKNOWN) |
| 33 | |
| 34 | # if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then |
| 35 | # sudo rm -Rf ndn-cxx |
| 36 | # mv ndn-cxx-latest ndn-cxx |
| 37 | # cp ndn-cxx ndn-cxx-hotfix |
| 38 | # else |
| 39 | # sudo rm -Rf ndn-cxx-latest |
| 40 | # fi |
| 41 | |
Alexander Afanasyev | bc98fcf | 2014-08-16 23:18:50 -0700 | [diff] [blame] | 42 | sudo rm -Rf /usr/local/include/ndn-cxx |
| 43 | sudo rm -f /usr/local/lib/libndn-cxx* |
| 44 | sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx* |
| 45 | |
Nick Gordon | b9c5cec | 2017-06-08 14:10:27 -0500 | [diff] [blame] | 46 | ## Change to the hotfix directory instead of the normal ndn-cxx directory |
| 47 | ## Restore below line when #3920 and #4119 merge. |
| 48 | #pushd ndn-cxx >/dev/null |
| 49 | pushd ndn-cxx-hotfix >/dev/null |
| 50 | git checkout b555b00c280b9c9ed46f24a1fbebc73b720601af |
Alexander Afanasyev | f9f3910 | 2015-12-01 17:43:40 -0800 | [diff] [blame] | 51 | |
| 52 | ./waf configure -j1 --color=yes --enable-shared --disable-static --without-osx-keychain |
Alexander Afanasyev | bc98fcf | 2014-08-16 23:18:50 -0700 | [diff] [blame] | 53 | ./waf -j1 --color=yes |
Alexander Afanasyev | 24ed83a | 2015-03-30 11:06:50 -0700 | [diff] [blame] | 54 | sudo ./waf install -j1 --color=yes |
| 55 | |
| 56 | popd >/dev/null |
| 57 | popd >/dev/null |
Alexander Afanasyev | f9f3910 | 2015-12-01 17:43:40 -0800 | [diff] [blame] | 58 | |
| 59 | if has Linux $NODE_LABELS; then |
| 60 | sudo ldconfig |
Ashlesh Gawande | 415676b | 2016-12-22 00:26:23 -0600 | [diff] [blame] | 61 | elif has FreeBSD10 $NODE_LABELS; then |
| 62 | sudo ldconfig -m |
Alexander Afanasyev | f9f3910 | 2015-12-01 17:43:40 -0800 | [diff] [blame] | 63 | fi |