postrm is in tex-common 2.10.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | #!/bin/sh -e
#
# postrm maintainer script for the Debian package.
# $Id: postrm.in 4540 2010-01-18 16:59:06Z preining $
# Copyright (C) 2004 by Frank K�ster <frank@kuesterei.ch>.
#
# The eperl code is taken from the auctex package, Copyright (C) 1999,
# 2000, 01, 02, 03, 04 by Davide Giovanni Maria Salvetti.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to: The Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
# On Debian GNU/Linux System you can find a copy of the GNU General Public
# License in "/usr/share/common-licenses/GPL".
## variables
PURGE_EXTENSIONS="'~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist preinst-bak postinst-bak"
UCF_FILES="texmf.d/05TeXMF.cnf texmf.d/15Plain.cnf texmf.d/45TeXinputs.cnf texmf.d/55Fonts.cnf texmf.d/65BibTeX.cnf texmf.d/75DviPS.cnf texmf.d/80DVIPDFMx.cnf texmf.d/85Misc.cnf texmf.d/90TeXDoc.cnf texmf.d/95NonPath.cnf updmap.d/00updmap.cfg"
TEXMFSYSVARDIR="/var/lib/texmf"
# give commandline args a name
action=$1 # remove, purge, upgrade, failed-upgrade, abort-install, abort-upgrade, disappear
#################################################################
## Function definitions - included from file postrm.functions
#################################################################
purge_file () {
local conffile
conffile="$1"
for ext in $PURGE_EXTENSIONS; do
rm -f "${conffile}.${ext}"
done
rm -f "${conffile}"
}
purge_ucf_file () {
local conffile
conffile="$1"
purge_file $conffile
if [ -x /usr/bin/ucf ]; then
ucf --purge "${conffile}"
fi
if [ -x /usr/bin/ucfr ]; then
ucfr --purge tex-common "${conffile}"
fi
}
## do the things we have to do always
case $action in
remove)
# remove TEXMFSYSVARDIR: All files and dirs are created either by
# us, or by packages depending on us.
rm -rf $TEXMFSYSVARDIR
# same with obsolete /var/cache/fonts
rm -rf /var/cache/fonts
;;
purge)
# purge texmf_parts
for file in $UCF_FILES; do
purge_ucf_file /etc/texmf/$file
done
# purge texmf.cnf which is generated by update-texmf using ucf:
purge_ucf_file /etc/texmf/texmf.cnf
# try to remove /usr/local/share/texmf if it is empty
# people should normally not have TEXMFLOCAL ls-R files
# unless they called mktexlsr manually, in which case this is fine
# maintainer scripts should call mktexlsr with a list of trees so
# no /u/l/s/texmf/ls-R is created
#rm -f /usr/local/share/texmf/ls-R 2>/dev/null || true
rmdir --ignore-fail-on-non-empty /usr/local/share/texmf/ 2>/dev/null || true
;;
*)
;;
esac
# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
# End automatically added section
|