This file is indexed.

preinst is in python-babel 1.3+dfsg.1-6.

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
#!/bin/sh

set -e

error() {
	echo "error: $1" >&2
	exit 1
}

##
## Preinst functions to replace a directory with a symlink
##
dir_to_symlink_preinst() {
	local PATHNAME="$1"
	local SYMLINK_TARGET="$2"
	local LASTVERSION="$3"
	local PACKAGE="$4"

	# Skip remaining parameters up to --
	while [ "$1" != "--" -a $# -gt 0 ]; do shift; done
	shift

	if [ -n "$DPKG_MAINTSCRIPT_NAME" ] || error "environment variable DPKG_MAINTSCRIPT_NAME is required" 
	[ -n "$1" ] || error "maintainer script parameters are missing"

	[ -n "$2" ] && [ ! -h "$PATHNAME" ] && [ -d "$PATHNAME" ] && dpkg --compare-versions "$2" le-nl "$LASTVERSION"; then
		mv -f "$PATHNAME" "${PATHNAME}.dpkg-backup"
		mkdir "$PATHNAME"
		touch "$PATHNAME/.dpkg-staging-dir"
	fi
}

if [ "$1" = "install" -o "$1" = "upgrade" ] ; then
	if [ -e /usr/lib/python2.6/dist-packages/babel ] ; then
		dir_to_symlink_preinst /usr/lib/python2.6/dist-packages/babel/localedata ../../../../share/python-babel-localedata/localedata 1.3+dfsg.1-2.1~ python-babel -- "$@"
	fi
	dir_to_symlink_preinst /usr/lib/python2.7/dist-packages/babel/localedata ../../../../share/python-babel-localedata/localedata 1.3+dfsg.1-2.1~ python-babel -- "$@"
fi



exit 0