debian/postinst
author Ryan C. Gordon <icculus@icculus.org>
Mon, 14 Mar 2005 11:49:30 +0000
changeset 691 71d9affe0d8a
parent 437 2dff6a7d42b4
permissions -rw-r--r--
All memory management now goes through allocation hooks instead of directly to C runtime malloc/realloc/free...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
437
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
#! /bin/sh
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
# postinst script for libphysfs0
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
#
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
# see: dh_installdeb(1)
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
set -e
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
# summary of how this script can be called:
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
#        * <postinst> `configure' <most-recently-configured-version>
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
#        * <old-postinst> `abort-upgrade' <new version>
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    12
#          <new-version>
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    14
#          <failed-install-package> <version> `removing'
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
#          <conflicting-package> <version>
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    16
# for details, see http://www.debian.org/doc/debian-policy/ or
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    17
# the debian-policy package
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    18
#
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
# quoting from the policy:
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
#     Any necessary prompting should almost always be confined to the
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21
#     post-installation script, and should be protected with a conditional
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    22
#     so that unnecessary prompting doesn't happen if a package's
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    23
#     installation fails and the `postinst' is called with `abort-upgrade',
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    24
#     `abort-remove' or `abort-deconfigure'.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    25
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    26
case "$1" in
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    27
    configure)
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    28
    ;;
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    29
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    30
    abort-upgrade|abort-remove|abort-deconfigure)
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    31
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    32
    ;;
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    34
    *)
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    35
        echo "postinst called with unknown argument \`$1'" >&2
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    36
        exit 1
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    37
    ;;
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    38
esac
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    39
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    40
# dh_installdeb will replace this with shell code automatically
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    41
# generated by other debhelper scripts.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    42
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    43
#DEBHELPER#
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    44
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    45
exit 0
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    46
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    47