#!/bin/sh
# Update mkfontscale and mkfontdir:
if [ -x /usr/bin/mkfontdir ]; then
  mkfontscale usr/share/fonts/TTF 2> /dev/null
  mkfontdir usr/share/fonts/TTF 2> /dev/null
fi
# Update the X font indexes:
if [ -x /usr/bin/fc-cache ]; then
  /usr/bin/fc-cache -f 2> /dev/null
fi
( cd etc/fonts/conf.d ; rm -rf 90-ttf-bengali-fonts.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/90-ttf-bengali-fonts.conf 90-ttf-bengali-fonts.conf )
( cd etc/fonts/conf.d ; rm -rf 90-ttf-devanagari-fonts.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/90-ttf-devanagari-fonts.conf 90-ttf-devanagari-fonts.conf )
( cd etc/fonts/conf.d ; rm -rf 90-ttf-gujarati-fonts.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/90-ttf-gujarati-fonts.conf 90-ttf-gujarati-fonts.conf )
( cd etc/fonts/conf.d ; rm -rf 90-ttf-kannada-fonts.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/90-ttf-kannada-fonts.conf 90-ttf-kannada-fonts.conf )
( cd etc/fonts/conf.d ; rm -rf 90-ttf-malayalam-fonts.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/90-ttf-malayalam-fonts.conf 90-ttf-malayalam-fonts.conf )
( cd etc/fonts/conf.d ; rm -rf 90-ttf-oriya-fonts.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/90-ttf-oriya-fonts.conf 90-ttf-oriya-fonts.conf )
( cd etc/fonts/conf.d ; rm -rf 90-ttf-punjabi-fonts.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/90-ttf-punjabi-fonts.conf 90-ttf-punjabi-fonts.conf )
( cd etc/fonts/conf.d ; rm -rf 90-ttf-tamil-fonts.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/90-ttf-tamil-fonts.conf 90-ttf-tamil-fonts.conf )
( cd etc/fonts/conf.d ; rm -rf 90-ttf-telugu-fonts.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/90-ttf-telugu-fonts.conf 90-ttf-telugu-fonts.conf )
