postinst is in python3-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 43 44 45 46 47 | #!/bin/sh
set -e
##
## Postinst functions to replace a directory with a symlink
##
dir_to_symlink_postinst() {
local PATHNAME="$1"
local SYMLINK_TARGET="$2"
local LASTVERSION="$3"
local PACKAGE="$4"
while [ "$1" != "--" -a $# -gt 0 ]; do shift; done
shift
if [ -d "${PATHNAME}.dpkg-backup" ] && [ ! -h "$PATHNAME" ] && [ -d "$PATHNAME" ] && [ -f "$PATHNAME/.dpkg-staging-dir" ] ; then
# Move the contents of the staging directory to the symlink target,
# as those are all new files installed between this package being
# unpacked and configured.
rm "$PATHNAME/.dpkg-staging-dir"
find "$PATHNAME" -mindepth 1 -print0 | xargs -0 -i% mv -f "%" "$SYMLINK_TARGET/"
# Remove the staging directory.
rmdir "$PATHNAME"
# Do the actual switch.
ln -s "$SYMLINK_TARGET" "$PATHNAME"
# We are left behind the old files owned by this package in the backup
# directory, just remove it.
rm -rf "${PATHNAME}.dpkg-backup"
fi
}
if [ "$1" = "configure" ] ; then
update-alternatives --install /usr/bin/pybabel pybabel /usr/bin/pybabel-python3 200
dir_to_symlink_postinst /usr/lib/python3/dist-packages/babel/localedata ../../../../share/python-babel-localedata/localedata 1.3+dfsg.1-2.1~ python3-babel -- "$@"
fi
# Automatically added by dhpython:
if which py3compile >/dev/null 2>&1; then
py3compile -p python3-babel
fi
# End automatically added section
|