This file is indexed.

preinst is in jadetex 3.13-14.

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
#! /bin/sh
# preinst script for jadetex
#
# see: dh_installdeb(1)

set -e

PACKAGE=jadetex

# summary of how this script can be called:
#        * <new-preinst> `install'
#        * <new-preinst> `install' <old-version>
#        * <new-preinst> `upgrade' <old-version>
#        * <old-preinst> `abort-upgrade' <new-version>
#
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

remove_conffile_prepare () {
  # syntax: remove_conffile_prepare filename official_md5sum ...
  #
  # Check a conffile "filename" against a list of canonical MD5 checksums.
  # If the file's current MD5 checksum matches one of the "official_md5sum"
  # operands provided, then prepare the conffile for removal from the system.
  # We defer actual deletion until the package is configured so that we can
  # roll this operation back if package installation fails.
  #
  # Call this function from a preinst script in the event $1 is "upgrade" or
  # "install" and verify $2 to ensure the package is being upgraded from a
  # version (or installed over a version removed-but-not-purged) prior to the
  # one in which the conffile was obsoleted.

  # validate arguments
  if [ $# -lt 2 ]; then
    echo "remove_conffile_prepare() called with wrong number of" \
                "arguments; expected at least 2, got $#"
    exit 2
  fi

  conffile="$1"
  shift

  # does the conffile even exist?
  if [ -e "$conffile" ]; then
    # calculate its checksum
    current_checksum=$(md5sum < "$conffile" | sed 's/[[:space:]].*//')
    # compare it to each supplied checksum
    while [ -n "$1" ]; do
      if [ "$current_checksum" = "$1" ]; then
        # we found a match; move the confffile and stop looking
        echo "preparing obsolete conffile $conffile for removal"
        mv "$conffile" "$conffile.${PACKAGE}-tmp"
        break
      fi
      shift
    done
  fi
}


case "$1" in
    install|upgrade)
	if dpkg --compare-versions "$2" le "3.13-3"; then
		remove_conffile_prepare /etc/texmf/fmt.d/40jadetex.cnf \
			0812091d71375023df7dcecb7290b10a
	fi
	if [ -L /usr/share/texmf/tex/jadetex/config ] ; then
	    if [ "$(readlink -n -s /usr/share/texmf/tex/jadetex/config)" = "/etc/texmf/jadetex" ] ; then
	        echo "Removing /usr/share/texmf/tex/jadetex/config symlink."
		rm /usr/share/texmf/tex/jadetex/config
	    fi
	fi
    ;;

    abort-upgrade)
        if ! [ -e /usr/share/texmf/tex/jadetex/config ] ; then
	    ln -s /etc/texmf/jadetex /usr/share/texmf/tex/jadetex/config
	fi
    ;;

    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0