1
0
Fork 0
mirror of https://github.com/xHyroM/void-packages.git synced 2024-11-24 23:31:04 +01:00
void-packages/srcpkgs/xbps-triggers/files/texmf-dist

49 lines
984 B
Text
Raw Normal View History

2024-03-30 14:09:59 +01:00
#!/bin/sh
#
# Updates texmf-dist hashes and format library.
#
# Arguments: $ACTION = [run/targets]
# $TARGET = [post-install/post-remove]
# $PKGNAME
# $VERSION
# $UPDATE = [yes/no]
#
ACTION="$1"
TARGET="$2"
PKGNAME="$3"
VERSION="$4"
UPDATE="$5"
texhash=usr/bin/texhash
fmtutil=usr/bin/fmtutil-sys
updmap=usr/bin/updmap-sys
optional_engines="luahbtex,luajithbtex,luajittex,luatex,xetex"
case "$ACTION" in
targets)
echo "post-install post-remove"
;;
run)
if [ -x ${texhash} ]; then
echo "Updating texmf-dist hashes..."
${texhash} 2>&1 >/dev/null || true # silence strange errors
fi
if [ -x ${fmtutil} ]; then
echo "Updating texmf-dist formats..."
${fmtutil} --no-error-if-no-engine="${optional_engines}" \
--quiet --all >/dev/null || true
fi
if [ -x ${updmap} ]; then
echo "Syncing font map files..."
yes y | ${updmap} --quiet --syncwithtrees >/dev/null
echo "Updating font map files..."
${updmap} --quiet >/dev/null
fi
;;
*)
exit 1
;;
esac
exit 0