2012-02-06 15:41:43 +00:00
|
|
|
infodir=usr/share/info
|
|
|
|
filelist=(dvipng.info dvips.info eplain.info epspdf.info fontname.info kpathsea.info latex2e-es.info latex2e.info latex2man.info mf2pt1.info tds.info texdraw.info web2c.info)
|
|
|
|
|
2011-09-17 17:37:29 +00:00
|
|
|
post_install() {
|
|
|
|
echo ">>> texlive: updating the filename database..."
|
|
|
|
usr/bin/mktexlsr
|
|
|
|
echo -n "creating all formats..."
|
|
|
|
usr/bin/fmtutil-sys --all 1>/dev/null
|
|
|
|
echo " done."
|
|
|
|
echo " (logs are under /var/lib/texmf/web2c/<engine>/<formatname>.log)"
|
2012-02-06 15:41:43 +00:00
|
|
|
|
|
|
|
[[ -x usr/bin/install-info ]] || return 0
|
|
|
|
for file in "${filelist[@]}"; do
|
|
|
|
install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
|
|
|
|
done
|
2011-09-17 17:37:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
post_upgrade() {
|
2012-07-26 12:24:14 +00:00
|
|
|
local corename corever _pacout
|
2011-09-17 17:37:29 +00:00
|
|
|
echo ">>> texlive: updating the filename database..."
|
|
|
|
usr/bin/mktexlsr
|
2012-07-26 12:24:14 +00:00
|
|
|
_pacout=$(pacman -Q texlive-core 2>/dev/null)
|
|
|
|
read corename corever <<< ${_pacout}
|
|
|
|
if [[ ${corever} == 2012* ]]; then
|
|
|
|
echo -n "recreating all formats..."
|
|
|
|
usr/bin/fmtutil-sys --all 1>/dev/null
|
|
|
|
echo " done."
|
|
|
|
echo " (logs are under /var/lib/texmf/web2c/<engine>/<formatname>.log)"
|
|
|
|
else
|
|
|
|
echo "WARNING: not recreating formats since texlive-core has version '$corever'"
|
|
|
|
fi
|
2012-02-06 15:41:43 +00:00
|
|
|
[[ -x usr/bin/install-info ]] || return 0
|
|
|
|
for file in "${filelist[@]}"; do
|
|
|
|
install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
|
|
|
|
done
|
2011-09-17 17:37:29 +00:00
|
|
|
}
|
|
|
|
|
2012-02-06 15:41:43 +00:00
|
|
|
pre_remove() {
|
|
|
|
[[ -x usr/bin/install-info ]] || return 0
|
|
|
|
for file in "${filelist[@]}"; do
|
|
|
|
install-info --delete "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
|
|
|
|
done
|
|
|
|
}
|