This file is indexed.

postinst is in posh 0.12.3.

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
#!/bin/sh
#
# post-install script for the Debian GNU/Linux posh package
#
# $Id: ash.postinst,v 1.7 2001/09/28 22:43:57 herbert Exp $

set -e

check_divert() {
	div=$(dpkg-divert --package posh --list $2)
	distrib=${4:-$2.distrib}
	if [ "$1" = true ]; then
		if [ -z "$div" ]; then
			dpkg-divert --package posh --divert $distrib --add $2
			cp -dp $2 $distrib
			ln -sf $3 $2
		fi
	else
		if [ -n "$div" ] && [ -z "${div%%*by posh}" ]; then
			mv $distrib $2
			dpkg-divert --package posh --remove $2
		fi
	fi
}

unset debconf || true
if [ -f /usr/share/debconf/confmodule ]; then
	. /usr/share/debconf/confmodule
	debconf=yes
fi

if [ -n "$2" ]
then
	src=/usr/share/man/man1/sh.1.gz
	dst=/usr/share/man/man1/sh.distrib.1.gz
	div=$(dpkg-divert --package posh --list $src)
	if [ -n "$div" ] && [ -z "${div%%*by posh}" ]; then
		distrib=${div% by posh}
		distrib=${distrib##* to }
		[ -f $distrib ] || distrib=$dst
		mv $distrib $src
		dpkg-divert --package posh --remove $src
		check_divert true $src posh.1.gz $dst
			
	fi
fi

if [ $debconf ]; then
	db_get posh/sh
	check_divert "$RET" /bin/sh posh
	check_divert "$RET" /usr/share/man/man1/sh.1.gz posh.1.gz \
		/usr/share/man/man1/sh.distrib.1.gz
fi

if [ "$1" = "configure" ] && test -x /usr/bin/update-menus; then update-menus ; fi