1
0
Fork 0

bootstrap: install maplemono-nf from AUR via paru, keep GitHub zip fallback

This commit is contained in:
Rain 2026-08-26 15:02:03 -04:00
parent 63106f5e3f
commit 70d339140b

View file

@ -306,9 +306,17 @@ if fc-list : family 2>/dev/null | grep -qxF 'Maple Mono NF'; then
log "Maple Mono NF already installed" log "Maple Mono NF already installed"
else else
{{ if eq .os_family "arch" -}} {{ if eq .os_family "arch" -}}
# Try paru first (clean install via AUR). If it fails (e.g. sudo TTY prompt # Install from AUR via paru (maplemono-nf package; paru is set up by
# in non-interactive runs, or AUR helper missing), fall back to downloading # run_once_10-add-chaotic-aur). If paru is missing or the AUR install
# the upstream zip release directly — no sudo needed. # fails (e.g. sudo TTY prompt in non-interactive runs), fall back to
# downloading the upstream zip release directly — no sudo needed.
if command -v paru >/dev/null 2>&1 && paru -S --needed --noconfirm maplemono-nf; then
log "maplemono-nf installed via AUR (paru)"
if ! fc-list : family 2>/dev/null | grep -qxF 'Maple Mono NF'; then
log "WARNING: maplemono-nf installed but 'Maple Mono NF' family not found"
fi
else
log "AUR install unavailable or failed — falling back to GitHub zip"
FONT_DIR="$USER_HOME/.local/share/fonts/maple-mono-nf" FONT_DIR="$USER_HOME/.local/share/fonts/maple-mono-nf"
mkdir -p "$FONT_DIR" mkdir -p "$FONT_DIR"
TMP_ZIP="$(mktemp /tmp/maple-font.XXXXXX.zip)" TMP_ZIP="$(mktemp /tmp/maple-font.XXXXXX.zip)"
@ -329,6 +337,7 @@ else
log "manual install: https://github.com/subframe7536/Maple-font" log "manual install: https://github.com/subframe7536/Maple-font"
rm -f "$TMP_ZIP" rm -f "$TMP_ZIP"
fi fi
fi
{{ else if eq .os_family "debian" -}} {{ else if eq .os_family "debian" -}}
log "downloading MapleMono-NF.zip from subframe7536/Maple-font $MAPLE_FONT_VERSION" log "downloading MapleMono-NF.zip from subframe7536/Maple-font $MAPLE_FONT_VERSION"
FONT_DIR="$USER_HOME/.local/share/fonts/maple-mono-nf" FONT_DIR="$USER_HOME/.local/share/fonts/maple-mono-nf"