blob: c02087140a36513be183596c4fef857527de65b0 [file] [log] [blame]
Davide Pesavento29db0fd2017-08-29 13:32:00 -04001#!/usr/bin/env bash
Davide Pesavento5b9c85a2020-04-09 21:10:54 -04002set -ex
Davide Pesavento29db0fd2017-08-29 13:32:00 -04003
4if has OSX $NODE_LABELS; then
5 FORMULAE=(boost openssl pkg-config)
Davide Pesavento5b9c85a2020-04-09 21:10:54 -04006 if has OSX-10.13 $NODE_LABELS || has OSX-10.14 $NODE_LABELS; then
7 FORMULAE+=(python)
Davide Pesavento29db0fd2017-08-29 13:32:00 -04008 fi
Davide Pesavento29db0fd2017-08-29 13:32:00 -04009
Davide Pesavento5b9c85a2020-04-09 21:10:54 -040010 if [[ -n $TRAVIS ]]; then
11 # Travis images come with a large number of pre-installed
12 # brew packages, don't waste time upgrading all of them
13 brew list --versions "${FORMULAE[@]}" || brew update
14 for FORMULA in "${FORMULAE[@]}"; do
15 brew list --versions "$FORMULA" || brew install "$FORMULA"
16 done
17 # Ensure /usr/local/opt/openssl exists
18 brew reinstall openssl
19 else
20 brew update
21 brew upgrade
22 brew install "${FORMULAE[@]}"
23 brew cleanup
24 fi
25
26elif has Ubuntu $NODE_LABELS; then
Davide Pesavento29db0fd2017-08-29 13:32:00 -040027 sudo apt-get -qq update
Davide Pesavento1cbe1d02020-08-09 01:58:44 -040028 sudo apt-get -qy install build-essential pkg-config python3-minimal \
Davide Pesavento5b9c85a2020-04-09 21:10:54 -040029 libboost-all-dev libssl-dev libsqlite3-dev
Davide Pesavento29db0fd2017-08-29 13:32:00 -040030fi