From 69bcc71965e8fdc13da33ed4e319aaff40a9d67c Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 25 Jul 2024 16:58:44 -0400 Subject: install-fonts.sh: avoid running fc-cache -f twice, if the BDF and TTF dirs are the same. --- install-fonts.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/install-fonts.sh b/install-fonts.sh index fdff051..7d803f8 100644 --- a/install-fonts.sh +++ b/install-fonts.sh @@ -58,10 +58,12 @@ install_font 24 cp "fonts/FauxtariScalableMono.ttf" "$TTFDIR" if [ "$SYSTEM" = "yes" ]; then - cd "$TTFDIR" - mkfontdir - mkfontscale - xset fp rehash &> /dev/null fc-cache -f "$BDFDIR" &> /dev/null - fc-cache -f "$TTFDIR" &> /dev/null + xset fp rehash &> /dev/null + if [ "$BDFDIR" != "$TTFDIR" ]; then + cd "$TTFDIR" + mkfontdir + mkfontscale + fc-cache -f "$TTFDIR" &> /dev/null + fi fi -- cgit v1.2.3