Davide Pesavento | 0bd3731 | 2017-08-20 20:21:13 -0400 | [diff] [blame^] | 1 | #!/usr/bin/env bash |
| 2 | set -e |
| 3 | |
| 4 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 5 | source "$JDIR"/util.sh |
| 6 | |
| 7 | set -x |
| 8 | |
| 9 | if has OSX $NODE_LABELS; then |
| 10 | FORMULAE=(boost pkg-config cryptopp log4cxx openssl) |
| 11 | brew update |
| 12 | if [[ -n $TRAVIS ]]; then |
| 13 | # travis images come with a large number of brew packages |
| 14 | # pre-installed, don't waste time upgrading all of them |
| 15 | for FORMULA in "${FORMULAE[@]}"; do |
| 16 | brew outdated $FORMULA || brew upgrade $FORMULA |
| 17 | done |
| 18 | else |
| 19 | brew upgrade |
| 20 | fi |
| 21 | brew install "${FORMULAE[@]}" |
| 22 | brew link --force log4cxx |
| 23 | brew cleanup |
| 24 | fi |
| 25 | |
| 26 | if has Ubuntu $NODE_LABELS; then |
| 27 | sudo apt-get -qq update |
| 28 | sudo apt-get -qy install build-essential pkg-config libboost-all-dev \ |
| 29 | libcrypto++-dev libsqlite3-dev libssl-dev \ |
| 30 | liblog4cxx10-dev |
| 31 | |
| 32 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
| 33 | sudo apt-get -qy install lcov libgd-perl python-setuptools |
| 34 | sudo easy_install --upgrade gcovr |
| 35 | fi |
| 36 | fi |