#!/bin/zsh -Ndefgku
#
# Scripts/bootstrap
# mas
#
# Installs dependencies for Scripts/format & Scripts/lint.
#
# Usage: bootstrap [<brew-bundle-install-argument>...]
#

. "${0:a:h}/_setup_script"

print_notice '👢 Bootstrapping' "${@}"

if ! whence brew >/dev/null; then
	/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi

brew update -q
brew bundle upgrade -q "${@}"
brew upgrade -q "${(f)$(brew deps --union "${(f)$(brew bundle list)}")}"
