Skip to content

Commit

Permalink
Only install packages if required on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
rajat2004 committed Jan 5, 2021
1 parent c0df405 commit 900d315
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 900d315

Please sign in to comment.