mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 00:50:37 +08:00
e6f7a75fdc
Change-Id: I8b297a7b8ae1cd2e3a34e38f52121f420d5b7651
20 lines
439 B
Bash
Executable File
20 lines
439 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Stop processing on any error.
|
|
set -e
|
|
|
|
function install_if_not_installed() {
|
|
declare -r formula="$1"
|
|
if [[ $(brew list ${formula} &>/dev/null; echo $?) -ne 0 ]]; then
|
|
brew install ${formula}
|
|
else
|
|
echo "$0 - ${formula} is already installed."
|
|
fi
|
|
}
|
|
|
|
install_if_not_installed cmake
|
|
install_if_not_installed glog
|
|
install_if_not_installed gflags
|
|
install_if_not_installed eigen
|
|
install_if_not_installed suite-sparse
|