Austin Schuh | 70cc955 | 2019-01-21 19:46:48 -0800 | [diff] [blame^] | 1 | #!/bin/bash |
2 | |||||
3 | # Stop processing on any error. | ||||
4 | set -e | ||||
5 | |||||
6 | function 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 | |||||
15 | install_if_not_installed cmake | ||||
16 | install_if_not_installed glog | ||||
17 | install_if_not_installed gflags | ||||
18 | install_if_not_installed eigen | ||||
19 | install_if_not_installed suite-sparse |