#!/bin/sh
LOGFILE=/dev/null
if [ -e /usr/share/texmf-dist/web2c/updmap-fontsextra.cfg ]; then
  cp /usr/share/texmf-dist/web2c/updmap-fontsextra.cfg /usr/share/texmf-dist/web2c/updmap.cfg
elif [ -e /usr/share/texmf-dist/web2c/updmap-dist.cfg ]; then
  cp /usr/share/texmf-dist/web2c/updmap-dist.cfg /usr/share/texmf-dist/web2c/updmap.cfg
elif [ -e /usr/share/texmf-dist/web2c/updmap-collection-basic.cfg ]; then
  cp /usr/share/texmf-dist/web2c/updmap-collection-basic.cfg /usr/share/texmf-dist/web2c/updmap.cfg
fi
yes|/usr/bin/updmap-sys --syncwithtrees --force >> $LOGFILE 2>&1
yes|/usr/bin/updmap-sys --syncwithtrees --force >> $LOGFILE 2>&1
# note: filetrigger in tex-common
# /usr/bin/texhash > $LOGFILE 2>&1
# avoid autoreq dependency on mtxrun
MTXRUNEXE=/usr/bin/mtxrun
[ -x $MTXRUNEXE ] && $MTXRUNEXE --generate >> $LOGFILE 2>&1
export TEXMF=/usr/share/texmf-dist
export TEXMFCNF=/usr/share/texmf-dist/web2c
export TEXMFCACHE=/var/lib/texmf
# fmtutil-sys on partial install cn't build --all formats, so exit code can be > 0
/usr/bin/fmtutil-sys --no-strict --all >> $LOGFILE 2>&1 ||:
