File: fetchmail-ssl.preinst

package info (click to toggle)
fetchmail-ssl 5.9.11-6.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,952 kB
  • ctags: 2,498
  • sloc: ansic: 20,487; sh: 3,574; python: 1,705; yacc: 761; makefile: 682; perl: 640; lex: 258; awk: 124; sed: 93; lisp: 84
file content (53 lines) | stat: -rw-r--r-- 1,365 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
#! /bin/sh
# preinst script for fetchmail/fetchmail-ssl
# $Id: fetchmail.preinst,v 1.3 2002/02/02 23:07:48 hmh Exp $
#
# see: dh_installdeb(1)

package=fetchmail-ssl

set -e

# 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 /usr/share/doc/debian-policy/

case "$1" in
    upgrade)
    #
    # Handle symlinks in /usr/share/doc
    #
    [ ! -L "/usr/share/doc/${package}" ] && {
        [ -e "/usr/share/doc/${package}.toberemoved" ] && {
		echo "$0: Fatal error: /usr/share/doc/${package}.toberemoved exists" 1>&2
		echo "$0: Please remove it and /usr/share/doc/${package}, and reattempt to install fetchmail" 1>&2
		exit 1
	}
	[ -d "/usr/share/doc/${package}" ] || {
		echo "$0: Fatal error: /usr/share/doc/${package} not a directory"
		exit 1
	}
    	echo "$0: Handling upgrade of /usr/share/doc/${package}..." 1>&2
	mv "/usr/share/doc/${package}" "/usr/share/doc/${package}.toberemoved"
    }
    ;;

    install|abort-upgrade)
    ;;

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

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

#DEBHELPER#

exit 0