void-packages/srcpkgs/xbps-triggers/files/texmf-dist

40 lines
648 B
Bash
Executable file

#!/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
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} --all >/dev/null || true
fi
;;
*)
exit 1
;;
esac
exit 0