#!/usr/bin/env bash

# omarchy:summary=Install the MariaDB client
# omarchy:requires-sudo=true

# Based: Debian's client package. brew has no client-only package, so a Mac
# installs mariadb and stops the server it starts.

set -eo pipefail

echo "Installing the MariaDB client..."
omarchy-pkg-add mariadb-client brew=mariadb

if [[ $(omarchy-os) == darwin ]]; then
  brew services stop mariadb >/dev/null 2>&1 || true
fi
