Chengyu Fan | 2788755 | 2015-03-26 17:12:00 -0600 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
| 3 | set -e |
| 4 | |
| 5 | pushd /tmp >/dev/null |
| 6 | |
| 7 | INSTALLED_VERSION=$((cd ChronoSync && git rev-parse HEAD) 2>/dev/null || echo NONE) |
| 8 | |
| 9 | sudo rm -Rf ChronoSync-latest |
| 10 | git clone --depth 1 git://github.com/named-data/ChronoSync ChronoSync-latest |
| 11 | LATEST_VERSION=$((cd ChronoSync-latest && git rev-parse HEAD) 2>/dev/null || echo UNKNOWN) |
| 12 | |
| 13 | if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then |
| 14 | sudo rm -Rf ChronoSync |
| 15 | mv ChronoSync-latest ChronoSync |
| 16 | else |
| 17 | sudo rm -Rf ChronoSync-latest |
| 18 | fi |
| 19 | |
| 20 | sudo rm -Rf /usr/local/include/ChronoSync |
| 21 | sudo rm -f /usr/local/lib/libChronoSync* |
| 22 | sudo rm -f /usr/local/lib/pkgconfig/ChronoSync* |
| 23 | |
| 24 | pushd ChronoSync >/dev/null |
| 25 | |
| 26 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:\ |
| 27 | /usr/local/lib32/pkgconfig:\ |
| 28 | /usr/local/lib64/pkgconfig |
| 29 | |
Chengyu Fan | c7b87ad | 2015-07-09 16:44:37 -0600 | [diff] [blame] | 30 | sudo ldconfig || true |
Chengyu Fan | 2788755 | 2015-03-26 17:12:00 -0600 | [diff] [blame] | 31 | ./waf configure -j1 --color=yes |
| 32 | ./waf -j1 --color=yes |
| 33 | sudo ./waf install -j1 --color=yes |
| 34 | |
| 35 | popd >/dev/null |
| 36 | popd >/dev/null |