File: prerm.in

package info (click to toggle)
auctex 9.9p-13
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,328 kB
  • ctags: 761
  • sloc: lisp: 11,769; makefile: 197
file content (71 lines) | stat: -rw-r--r-- 1,507 bytes parent folder | download
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
#include "variables"
#!/bin/bash -e
#
# postinst configuration file for Debian <:=$PACKAGE:> package.
# $Id: prerm.in,v 1.5 1999/10/31 22:01:57 salve Exp $
#
<:=@COPYRIGHT:>//

set -o posix

source <:=$CONFMODULE:>
db_version 2.0

deconf_autoload () {
    rm -f <:=$sstartd:>/<:=$EPRIORITY:><:=$PACKAGE:>.el
    return 0
}

undo_auto () {
    rm -rf <:=$var:>
    return 0
}

undo_link () {
    test -L /usr/doc/<:=$PACKAGE:> && rm -f /usr/doc/<:=$PACKAGE:>
    return 0
}

case "$1" in
    deconfigure)
    <:# deconfigure in-favour ${3:newpkg} ${4:newver} removing ${6:oldpkg} ${7:oldver}:>//
	<:# remove emacs startup file if present:>//
	deconf_autoload
    ;;
    remove|upgrade)
   <:# remove
      # (or, in case of conflict with newpkg)
      # remove in-favour ${3:newpkg} ${4:newver}:>//
    <:# upgrade ${2:newver}:>//
	<:# remove emacs startup file if present:>//
	deconf_autoload
	<:# remove info menu from info dir:>//
	<:=$IREMOVE:> <:=$PACKAGE:>
	<:# remove doc menu from doc dir:>//
	<:=$DREMOVE:> <:=$PACKAGE:>
	<:# remove compatibility link:>//
	undo_link
	<:# remove all parsed information files:>//
	undo_auto
	<:# remove byte compiled elisp:>//
	<:=$EREMOVE:> <:=$PACKAGE:>
    ;;
    failed-upgrade)
    <:# failed-upgrade ${2:oldver}
      # (fix old prerm from version $2 bugs here):>//
	:
    ;;
    *)
	echo "${0##*/}: Called with unknown argument \`$1'." >&2
    ;;
esac

<:# to be sure debconf moves on:>//
db_stop

exit 0
<:
# Local Variables:
# mode: shell-script
# End:
:>//