preinst is in yorick 2.2.04+dfsg1-9.
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 | #!/bin/sh
set -e
case "$1" in
install|upgrade)
# older (unofficial) versions of yorick 2.x shipped with the package
# manager but no debian-friendly setup. Users that have used pkg_mngr
# with this configuration have automatically created a pkg_setup.i file
# we'd like them to get rid of. All this mess can certainly disappear
# at lenny+1.
if [ -e /usr/lib/yorick/packages/pkg_setup.i ] &&
[ ! -h /usr/lib/yorick/packages/pkg_setup.i ]; then
[ -e /etc/yorick/packages ] || mkdir -p /etc/yorick/packages
if [ -e /etc/yorick/packages/pkg_setup.i ]; then
mv /etc/yorick/packages/pkg_setup.i \
/etc/yorick/packages/pkg_setup.i.dpkg-bak
fi
mv /usr/lib/yorick/packages/pkg_setup.i \
/etc/yorick/packages/pkg_setup.i
rm -f /etc/yorick/packages/pkg_setup_may_use_Y_HOME || true
fi
;;
esac
|