source: trunk/debathena/config/tex-config/debian/debathena-tex-config.preinst @ 25433

Revision 25433, 1.1 KB checked in by jdreed, 13 years ago (diff)
In tex-config: * Ensure texlive-base is configured first by depending on it * Conflict with texlive 2009-12 which uses ucf instead * Clean up installs where there is no .debathena-orig file
  • Property svn:executable set to *
Line 
1#!/bin/sh
2# preinst script for debathena-tex-config
3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9#        * <new-preinst> `install'
10#        * <new-preinst> `install' <old-version>
11#        * <new-preinst> `upgrade' <old-version>
12#        * <old-preinst> `abort-upgrade' <new-version>
13# for details, see http://www.debian.org/doc/debian-policy/ or
14# the debian-policy package
15
16
17fix_dpkgnew () {
18    file=$1
19    if [ -f ${file}.dpkg-new ] && ! [ -f ${file}.debathena-orig ]; then
20        mv -f ${file}.dpkg-new  ${file}.debathena-orig
21    fi
22}
23
24case "$1" in
25    install|upgrade)
26        if dpkg --compare-versions "$2" lt-nl 1.5~; then
27            fix_dpkgnew /etc/texmf/dvipdfm/config/config
28            fix_dpkgnew /etc/texmf/xdvi/XDvi
29            fix_dpkgnew /etc/texmf/dvipdfmx/dvipdfmx.cfg
30            fix_dpkgnew /etc/texmf/dvips/config/config.ps
31            fix_dpkgnew /etc/texmf/tex/generic/config/pdftexconfig.tex
32        fi
33    ;;
34
35    abort-upgrade)
36    ;;
37
38    *)
39        echo "preinst called with unknown argument \`$1'" >&2
40        exit 1
41    ;;
42esac
43
44# dh_installdeb will replace this with shell code automatically
45# generated by other debhelper scripts.
46
47#DEBHELPER#
48
49exit 0
Note: See TracBrowser for help on using the repository browser.