This file is indexed.

postinst is in wesnoth-1.10-core 1:1.10.2-1.

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
#!/bin/sh
# postinst script for wesnoth-1.10-core
# Copyright 2010 by Gerfried Fuchs <rhonda@debian.at>
# Licensed under WTFPLv2

set -e

divert_oldfiles()
{
	# programs
	for i in wesnoth wesnoth-nolog wesnoth-smallgui wesnoth-editor; do
		if ! dpkg-divert --list /usr/games/$i | grep -q /usr/games/$i; then
			dpkg-divert --package wesnoth-1.10-core \
				--divert /usr/games/$i-old \
				--rename /usr/games/$i
		fi
	done

	# manpages
	for i in ca_ES@valencia cs da de en_GB es et fi fr gl hu it ja \
		lt nl pl sk sr sr@latin sv tr zh_CN zh_TW; do
		if ! dpkg-divert --list /usr/share/man/$i/man6/wesnoth.6.gz | grep -q /usr/share/man/$i/man6/wesnoth.6.gz; then
			dpkg-divert --package wesnoth-1.10-core \
				--divert /usr/share/man/$i/man6/wesnoth-old.6.gz \
				--rename /usr/share/man/$i/man6/wesnoth.6.gz
		fi
	done
}

setup_alternatives()
{
	# man 6 wesnoth
	slaves=$(for man in /usr/share/man/*/man6/wesnoth-1.10.6.gz; do \
		lang=$(echo $man | sed -e 's#.*/man/##;s#/man6.*##;'); \
		echo -n " --slave /usr/share/man/$lang/man6/wesnoth.6.gz wesnoth.$lang.6.gz $man"; \
	done)
	slaves="$slaves --slave /usr/share/man/man6/wesnoth.6.gz wesnoth.6.gz /usr/share/man/man6/wesnoth-1.10.6.gz"

	slaves="$slaves --slave /usr/games/wesnoth-nolog wesnoth-nolog /usr/games/wesnoth-1.10-nolog"

	update-alternatives --install /usr/games/wesnoth wesnoth \
		/usr/games/wesnoth-1.10 110 \
		$slaves
}

case "$1" in
	configure|reconfigure)
		divert_oldfiles
		setup_alternatives
	;;
esac

# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
	update-menus
fi
# End automatically added section


exit 0