Ashlesh Gawande | 415676b | 2016-12-22 00:26:23 -0600 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
| 3 | set -e |
| 4 | |
| 5 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 6 | source "$JDIR"/util.sh |
| 7 | |
| 8 | pushd /tmp >/dev/null |
| 9 | |
| 10 | INSTALLED_VERSION= |
| 11 | if has OSX $NODE_LABELS; then |
| 12 | BOOST=$(brew ls --versions boost) |
| 13 | OLD_BOOST=$(cat boost_chrono.txt || :) |
| 14 | if [[ $OLD_BOOST != $BOOST ]]; then |
| 15 | echo "$BOOST" > boost_chrono.txt |
| 16 | INSTALLED_VERSION=NONE |
| 17 | fi |
| 18 | fi |
| 19 | |
Nick Gordon | b9c5cec | 2017-06-08 14:10:27 -0500 | [diff] [blame] | 20 | # if [[ -z $INSTALLED_VERSION ]]; then |
| 21 | # INSTALLED_VERSION=$((cd ChronoSync && git rev-parse HEAD) 2>/dev/null || echo NONE) |
| 22 | # fi |
Ashlesh Gawande | 415676b | 2016-12-22 00:26:23 -0600 | [diff] [blame] | 23 | |
| 24 | sudo rm -Rf ChronoSync-latest |
Nick Gordon | b9c5cec | 2017-06-08 14:10:27 -0500 | [diff] [blame] | 25 | ## Remove line when #3920 and #4119 merge. |
Nick Gordon | b9e2c65 | 2017-06-20 13:37:55 -0500 | [diff] [blame] | 26 | sudo rm -rf ChronoSync-hotfix |
| 27 | git clone git://github.com/named-data/ChronoSync ChronoSync-hotfix |
Ashlesh Gawande | 415676b | 2016-12-22 00:26:23 -0600 | [diff] [blame] | 28 | |
Nick Gordon | b9c5cec | 2017-06-08 14:10:27 -0500 | [diff] [blame] | 29 | # LATEST_VERSION=$((cd ChronoSync-latest && git rev-parse HEAD) 2>/dev/null || echo UNKNOWN) |
| 30 | |
| 31 | # if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then |
| 32 | # sudo rm -Rf ChronoSync |
| 33 | # mv ChronoSync-latest ChronoSync |
| 34 | # else |
| 35 | # sudo rm -Rf ChronoSync-latest |
| 36 | # fi |
| 37 | |
Davide Pesavento | 6a81b77 | 2017-08-20 18:43:46 -0400 | [diff] [blame^] | 38 | sudo rm -fr /usr/local/include/ChronoSync |
Ashlesh Gawande | 415676b | 2016-12-22 00:26:23 -0600 | [diff] [blame] | 39 | sudo rm -f /usr/local/lib/libChronoSync* |
| 40 | sudo rm -f /usr/local/lib/pkgconfig/ChronoSync* |
| 41 | |
Nick Gordon | b9c5cec | 2017-06-08 14:10:27 -0500 | [diff] [blame] | 42 | pushd ChronoSync-hotfix >/dev/null |
| 43 | git checkout 097bb448f46b8bd9a5c1f431e824f8f6a169b650 |
Ashlesh Gawande | 415676b | 2016-12-22 00:26:23 -0600 | [diff] [blame] | 44 | |
| 45 | if has FreeBSD10 $NODE_LABELS; then |
| 46 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ |
| 47 | fi |
| 48 | |
| 49 | ./waf -j1 --color=yes configure |
| 50 | ./waf -j1 --color=yes build |
Davide Pesavento | 6a81b77 | 2017-08-20 18:43:46 -0400 | [diff] [blame^] | 51 | sudo env "PATH=$PATH" ./waf install --color=yes |
Ashlesh Gawande | 415676b | 2016-12-22 00:26:23 -0600 | [diff] [blame] | 52 | |
| 53 | popd >/dev/null |
| 54 | popd >/dev/null |
| 55 | |
| 56 | if has Linux $NODE_LABELS; then |
| 57 | sudo ldconfig |
| 58 | elif has FreeBSD10 $NODE_LABELS; then |
| 59 | sudo ldconfig -m |
| 60 | fi |