#!/bin/sh

set -eu

PKG_NAME="fonts-albert-sans"
FAMILY_NAME="Albert Sans Narrow"
NUM_STYLES="18"

echo "$PKG_NAME should install $NUM_STYLES style(s) of font '$FAMILY_NAME'..."
num_matches="$(fc-list "$FAMILY_NAME" | wc -l)"
if [ "$num_matches" -eq "$NUM_STYLES" ] ; then
	echo "...OK"
else
	echo "ERROR: ...found $num_matches style(s) of '$FAMILY_NAME' instead of $NUM_STYLES." >&2
	echo "Installed fonts ('$FAMILY_NAME'):" >&2
	fc-list "$FAMILY_NAME" >&2
	echo "Installed fonts (all):" >&2
	fc-list >&2

	exit 2
fi
