blob: ce02fe4d1836cd5d495dcd5d2dffad3512226064 [file] [log] [blame]
Austin Schuh70cc9552019-01-21 19:46:48 -08001#!/bin/bash
2
3# Stop processing on any error.
4set -e
5
6function install_if_not_installed() {
7 declare -r formula="$1"
8 if [[ $(brew list ${formula} &>/dev/null; echo $?) -ne 0 ]]; then
9 brew install ${formula}
10 else
11 echo "$0 - ${formula} is already installed."
12 fi
13}
14
15install_if_not_installed cmake
16install_if_not_installed glog
17install_if_not_installed gflags
18install_if_not_installed eigen
19install_if_not_installed suite-sparse