Files
Kelx/scripts/subset-fontawesome.sh
T
2026-11-30 16:32:37 +00:00

15 lines
578 B
Bash

#!/usr/bin/env bash
# Subset the vendored Font Awesome webfonts to only the icons the panel uses.
# Self-contained: creates a local venv with fonttools+brotli if needed, then
# runs the Python subsetter. Re-run after adding new icons.
set -euo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VENV="$HERE/.venv"
if [ ! -x "$VENV/bin/python" ]; then
echo "[fa-subset] creating venv at $VENV"
python3 -m venv "$VENV"
"$VENV/bin/pip" install -q --upgrade pip
"$VENV/bin/pip" install -q fonttools brotli
fi
exec "$VENV/bin/python" "$HERE/subset-fontawesome.py"