Skip to content

Commit

Permalink
Merge pull request #3273 from rajat2004/fix-osx-install
Browse files Browse the repository at this point in the history
Only install packages if required on OSX
  • Loading branch information
zimmy87 authored Jan 8, 2021
2 parents 6ac9706 + 900d315 commit 40a2bba
Showing 1 changed file with 5 additions and 1 deletion.
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; }

# 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

0 comments on commit 40a2bba

Please sign in to comment.