mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
49 lines
1.6 KiB
Text
49 lines
1.6 KiB
Text
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)
|
|
|
|
post_install() {
|
|
if [[ -f usr/bin/mktexlsr ]]; then
|
|
echo ">>> texlive: updating the filename database..."
|
|
usr/bin/mktexlsr
|
|
fi
|
|
if [[ -f usr/bin/fmtutil-sys ]]; then
|
|
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)"
|
|
fi
|
|
[[ -x usr/bin/install-info ]] || return 0
|
|
for file in "${filelist[@]}"; do
|
|
install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
|
|
done
|
|
}
|
|
|
|
post_upgrade() {
|
|
local corename corever _pacout
|
|
if [[ -f usr/bin/mktexlsr ]]; then
|
|
echo ">>> texlive: updating the filename database..."
|
|
usr/bin/mktexlsr
|
|
fi
|
|
_pacout=$(pacman -Q texlive-core 2>/dev/null)
|
|
read corename corever <<< ${_pacout}
|
|
# only recreate formats if texlive-core has right version
|
|
if [[ ${corever} == 2014* ]]; then
|
|
if [[ -f usr/bin/fmtutil-sys ]]; 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)"
|
|
fi
|
|
fi
|
|
[[ -x usr/bin/install-info ]] || return 0
|
|
for file in "${filelist[@]}"; do
|
|
install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
|
|
done
|
|
}
|
|
|
|
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
|
|
}
|