preinst is in common-lisp-controller 7.8.
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 | #!/bin/sh
# preinst script for common-lisp-controller
#
# see: dh_installdeb(1)
set -e
# summary of how 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 http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
install)
# lisp-config.lisp is shipped as a conffile from 7.0 onwards, so when
# upgrading from earlier versions we have to remove the old
# auto-generated file, to avoid config file conflict (#601957)
if test "x$2" != "x" && dpkg --compare-versions "$2" lt 7.0; then
rm -f /etc/lisp-config.lisp
fi
;;
upgrade)
# same as the install case above
if dpkg --compare-versions "$2" lt 7.0; then
rm -f /etc/lisp-config.lisp
fi
# cleanup fasl files:
find /usr/share/common-lisp/source/defsystem \
/usr/share/common-lisp/source/asdf \
/usr/share/common-lisp/source/common-lisp-controller \
-type f -not -name "*.lisp" -print0 2> /dev/null \
| xargs --null rm --force 2> /dev/null
# remove old autobuild files:
find /etc/common-lisp -name autobuild -print0 | xargs -0 rm 2> /dev/null || true
find /etc/common-lisp -depth -type d -print0 | xargs rmdir 2> /dev/null || true
# remove old fals files:
if [ -d /usr/lib/common-lisp-controller ] ; then
rmdir --ignore-fail-on-non-empty /usr/lib/common-lisp-controller
fi
for compiler in /usr/lib/common-lisp/bin/*.sh ; do
if [ -f "$compiler" ] && [ -r "$compiler" ] ; then
i=${compiler##*/}
i=${i%.sh}
if [ -d "/usr/lib/common-lisp/${i}" ] ; then
rm -rf "/usr/lib/common-lisp/${i}"
fi
fi
done
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0
|