#!/usr/bin/env bash
set -euo pipefail

if ! command -v brew >/dev/null 2>&1; then
    printf 'Fout: brew is niet gevonden in PATH.\n' >&2
    exit 127
fi

if ! command -v omp >/dev/null 2>&1; then
    printf 'Fout: omp is niet gevonden in PATH.\n' >&2
    exit 127
fi

# Run the upgrade without asking for confirmation.
brew upgrade -y
omp update
exec omp "$@"
