texmf-dist (984B)
1#!/bin/sh 2# 3# Updates texmf-dist hashes and format library. 4# 5# Arguments: $ACTION = [run/targets] 6# $TARGET = [post-install/post-remove] 7# $PKGNAME 8# $VERSION 9# $UPDATE = [yes/no] 10# 11ACTION="$1" 12TARGET="$2" 13PKGNAME="$3" 14VERSION="$4" 15UPDATE="$5" 16 17texhash=usr/bin/texhash 18fmtutil=usr/bin/fmtutil-sys 19updmap=usr/bin/updmap-sys 20optional_engines="luahbtex,luajithbtex,luajittex,luatex,xetex" 21 22case "$ACTION" in 23targets) 24 echo "post-install post-remove" 25 ;; 26run) 27 if [ -x ${texhash} ]; then 28 echo "Updating texmf-dist hashes..." 29 ${texhash} 2>&1 >/dev/null || true # silence strange errors 30 fi 31 if [ -x ${fmtutil} ]; then 32 echo "Updating texmf-dist formats..." 33 ${fmtutil} --no-error-if-no-engine="${optional_engines}" \ 34 --quiet --all >/dev/null || true 35 fi 36 if [ -x ${updmap} ]; then 37 echo "Syncing font map files..." 38 yes y | ${updmap} --quiet --syncwithtrees >/dev/null 39 echo "Updating font map files..." 40 ${updmap} --quiet >/dev/null 41 fi 42 ;; 43*) 44 exit 1 45 ;; 46esac 47 48exit 0