preinst is in comixcursors-righthanded-opaque 0.7.2-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 56 57 58 59 | #! /bin/sh
# Pre-install script for ‘comixcursors-righthanded-opaque’.
#
# Manpage: ‘dh_installdeb(1)’
set -e
# Summary of ways this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# For details, see <URL:http://www.debian.org/doc/debian-policy/> or
# the ‘debian-policy’ package.
REMOVED_LIST=""
ICONDIR=/etc/X11/cursors
remove_omitted_alternatives () {
# Remove themes installed by previous versions but omitted
# from this version of the package.
if ! update-alternatives --quiet --list x-cursor-theme ; then
# No alternatives installed for ‘x-cursor-theme’, so we're
# done. We need to test this explicitly to avoid exiting with
# an error when listing the alternatives.
return
fi
installed_cursor_themes=`update-alternatives --list x-cursor-theme`
for theme in $REMOVED_LIST ; do
if echo "$installed_cursor_themes" | grep -q $theme ; then
update-alternatives --remove $ICONDIR/$theme
rm -f $ICONDIR/$theme
fi
done
}
case "$1" in
upgrade)
remove_omitted_alternatives
;;
install|abort-upgrade)
;;
*)
printf "preinst called with unknown argument ‘%s’\n" "$1" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0
|