#!/bin/bash
# -----------------------------------------------------------------------------
#
# Copyright (C) The BioDynaMo Project.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# See the LICENSE file distributed with this work for details.
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# -----------------------------------------------------------------------------

if [[ $# -ne 1 ]]; then
  echo "ERROR: Wrong number of arguments.
Description:
    This script installs the prerequisites of BioDynaMo, but not BioDynaMo
    itself. Script install.sh installs both prerequisites and BioDynaMo.
Arguments:
    <install_type>  all/required. If all is specified, then this script
                    will install all the prerequisites."
  exit 1
fi

# Install and upgrade required packages
brew install libomp tbb open-mpi git \
python python@2 llvm wget cmake || true

brew upgrade python cmake || true

# Install the optional packages
if [ $1 == "all" ]; then
    pip install --user mkdocs mkdocs-material
    brew install doxygen graphviz lcov gcovr || true
fi

#!/bin/bash
# -----------------------------------------------------------------------------
#
# Copyright (C) The BioDynaMo Project.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# See the LICENSE file distributed with this work for details.
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# -----------------------------------------------------------------------------

if [[ $# -ne 1 ]]; then
  echo "ERROR: Wrong number of arguments.
Description:
    This script installs the prerequisites of BioDynaMo, but not BioDynaMo
    itself. Script install.sh installs both prerequisites and BioDynaMo.
Arguments:
    <install_type>  all/required. If all is specified, then this script
                    will install all the prerequisites."
  exit 1
fi

brew update
brew style
brew update-reset

# Install and upgrade required packages
brew install libomp tbb open-mpi git \
python python@2 llvm wget cmake || true

brew upgrade python cmake || true

# Install the optional packages
if [ $1 == "all" ]; then
    pip install --user mkdocs mkdocs-material
    brew install doxygen graphviz lcov gcovr || true
fi

Update homebrew prior to installation
Update homebrew prior to installation