Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only install packages if required on OSX #3273

Merged
merged 1 commit into from
Jan 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ downloadHighPolySuv=true
MIN_CMAKE_VERSION=3.10.0
function version_less_than_equal_to() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" = "$1"; }

# brew gives error if package is already installed
function brew_install() { brew list $1 &>/dev/null || brew install $1; }
zimmy87 marked this conversation as resolved.
Show resolved Hide resolved

# Parse command line arguments
while [[ $# -gt 0 ]]
do
Expand Down Expand Up @@ -63,7 +66,8 @@ if [ "$(uname)" == "Darwin" ]; then # osx
sudo dseditgroup -o edit -a `whoami` -t user dialout
fi

brew install wget coreutils
brew_install wget
brew_install coreutils

if version_less_than_equal_to $cmake_ver $MIN_CMAKE_VERSION; then
brew install cmake # should get cmake 3.8
Expand Down