# SPDX-FileCopyrightText: © 2026 Caleb Maclennan <caleb@alerque.com>
# SPDX-License-Identifier: AGPL-3.0-only

alias acceptarium="${ACCEPTARIUM:-acceptarium}"
alias env="${ENV:-/usr/bin/env}"
alias grep="${GREP:-/usr/bin/grep}"

: ${TRANSFORMED_PACKAGE_NAME:=acceptarium}
export BINARY_PREFIX="${(U)TRANSFORMED_PACKAGE_NAME##*/}"

function flunk () {
	echo "Error: $@" >2
	exit 1
}

function get_config () {
	key=${BINARY_PREFIX}_${(U)1}
	echo -n "${(P)key}"
}

function debug_env () {
	env | grep "^(ACCEPTARIUM|$BINARY_PREFIX)"
}
