postinst is in afterstep 2.2.12-2.
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 61 62 63 64 65 66 67 68 69 70 71 72 73 | #!/bin/sh
set -e
update_alt()
{
# arguments: link program priority
if ! update-alternatives --display "$1" | grep -q "^/usr/bin/$2" ; then
update-alternatives --install "/usr/bin/$1" "$1" "/usr/bin/$2" "$3" \
--slave "/usr/share/man/man1/$1.1.gz" "$1.1.gz" \
"/usr/share/man/man1/$2.1x.gz"
fi
}
fix_docdir()
{
# Added in 2.2.11-5: convert doc/afterstep directory into a symlink
docdir=/usr/share/doc/afterstep
target=afterstep-data
if [ -e "$docdir" ] && [ ! -L "$docdir" ]; then
[ ! -d "$docdir" ] || rmdir --ignore-fail-on-non-empty "$docdir"
if [ -e "$docdir" ]; then
echo "The old $docdir directory contains locally modified files" >&2
echo "and will be saved as $docdir.SAVED_BY_POSTINST.$$" >&2
if ! mv "$docdir" "$docdir.SAVED_BY_POSTINST.$$"; then
echo "Failed to rename $docdir, please remove it manually" >&2
echo "and then retry the upgrade" >&2
fi
fi
ln -sf "$target" "$docdir"
fi
}
# Automatically added by debian/scripts/fix_conffiles
cfgdir="/etc/menu-methods"
ucfdir="/usr/share/afterstep/ucf"
cfgfiles="afterstep.menu-method"
package="afterstep"
if [ "$1" = "configure" ] ; then
ucfforce=""
if dpkg --compare-versions "$2" le 2.2.11-2~; then
ucfforce="--force"
fi
for f in $cfgfiles; do
uf="$ucfdir/$f"
cf="$cfgdir/${f%.menu-method}"
ucf --three-way "$uf" "$cf"
ucfr $ucfforce "$package" "$cf"
done
fi
# End automatically added section
# Automatically added by dh_installmenu
inst=/etc/menu-methods/afterstep
if [ -f $inst ]; then
chmod a+x $inst
if [ -x "`which update-menus 2>/dev/null`" ]; then
update-menus
fi
fi
# End automatically added section
if [ "$1" = "configure" ] ; then
update_alt x-window-manager afterstep 50
fix_docdir
fi
|