aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-07-25 16:58:44 -0400
committerB. Watson <urchlay@slackware.uk>2024-07-25 16:58:44 -0400
commit69bcc71965e8fdc13da33ed4e319aaff40a9d67c (patch)
treee010857a49997c90b84c4f5691cbf32fd4813bd3
parent0c7ad993f7f8cffcc3972a6f8e5517fd841051b5 (diff)
downloadbw-atari8-tools-69bcc71965e8fdc13da33ed4e319aaff40a9d67c.tar.gz
install-fonts.sh: avoid running fc-cache -f twice, if the BDF and TTF dirs are the same.
-rw-r--r--install-fonts.sh12
1 files 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