#!/usr/bin/env bash

set -exu

usage()
{
    echo "Usage: prep-for-macos-build"
}

if ! command -v brew; then
    /usr/bin/env \
        bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi

brew install make bash par2 readline rsync pkg-config md5sha1sum

# This avoid's macos interference, i.e. without this it looks like we
# won't actually be able to use the readline we just installed above.
brew link --force readline
# "brew unlink readline" will undo this hack

brew install python
python3 -m pip install --break-system-packages --user pytest pytest-xdist
