#!/bin/bash # # Remove pk files older than 20 days # Remove tfm files older than 60 days # Don't remove source files # Call texhash # test -r /etc/sysconfig/texlive && . /etc/sysconfig/texlive OLDIFS=$IFS; IFS=':;' VARTEXFONTS="$(kpsewhich --expand-var '$VARTEXFONTS' 2> /dev/null)" IFS=$OLDIFS if test "$CLEAR_TEXMF_FONTS" = "yes" -a -n "$VARTEXFONTS" -a -x /usr/bin/safe-rm ; then for p in $VARTEXFONTS ; do test -d $p/pk/ && find $p/pk/ -type f -and -atime +20 -print0 test -d $p/tfm/ && find $p/tfm/ -type f -and -atime +60 -print0 done > >(exec -a xargs xargs -r -l100 -0 -- /usr/bin/safe-rm) fi # # Update the ls-R's # texhash > /dev/null # exit 0