Blame generate-fmtutilcnf

2225dd4
#!/bin/bash
2225dd4
2225dd4
# Regenerate the fmtutil.cnf file from the pieces which are currently present
2225dd4
# in the fmtutil.cnf.d directory.
2225dd4
2225dd4
# Abort immediately if any command fails
2225dd4
set -o errexit
2225dd4
shopt -s nullglob
2225dd4
2225dd4
texdir=$1
2225dd4
[[ -z $texdir ]] && texdir=/usr/share/texlive
2225dd4
web2cdir=$texdir/texmf-dist/web2c
2225dd4
2225dd4
rm -f $web2cdir/fmtutil.cnf.rpmtmp
2225dd4
2225dd4
echo "# Generated by $0 on $(date)" > $web2cdir/fmtutil.cnf.rpmtmp
2225dd4
2225dd4
cat $web2cdir/fmtutil-hdr.cnf \
35df10b
    $texdir/fmtutil.cnf.d/* \
2225dd4
    >> $web2cdir/fmtutil.cnf.rpmtmp
2225dd4
2225dd4
mv $web2cdir/fmtutil.cnf.rpmtmp $web2cdir/fmtutil.cnf