File: preinst

package info (click to toggle)
tex-common 6.06
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,228 kB
  • ctags: 155
  • sloc: sh: 642; perl: 592; lisp: 276; python: 272; makefile: 143; sed: 4
file content (58 lines) | stat: -rw-r--r-- 1,600 bytes parent folder | download | duplicates (3)
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
#!/bin/sh -e
# 
# preinst maintainer script for the Debian tex-common package.
#
# Copyright (C) 2012 by Norbert Preining <preining@debian.org>
#
# 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".

umask 022

# prepare for change of symlink to real dir

slink=/usr/share/texmf/doc
slinktarget=../doc/texmf

case "$1" in
  upgrade|install)
    ov=$2
    if [ -n "$ov" ] && dpkg --compare-versions "$ov" lt 4 ; then
      if [ -L $slink ] && [ "$(readlink $slink)" = $slinktarget ] ; then
        mv $slink $slink.dpkg-remove
      fi
    fi
  ;;
esac

#
# remove not-used-anymore /var/lib/texmf/web2c/fmtutil.cnf
# see #851598

case "$1" in
  upgrade|install)
    rm -f /var/lib/texmf/web2c/fmtutil.cnf
  ;;
esac

#DEBHELPER#

### Local Variables:
### tab-width: 4
### indent-tabs-mode: nil
### End:
# vim:set tabstop=4 expandtab: #