preinst is in mediawiki 1:1.19.14+dfsg-1.
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 | #!/bin/sh
# $Id: mediawiki.preinst 494 2013-12-31 10:36:29Z tg $
# From MirOS: contrib/hosted/tg/deb/jupp/debian/jupp.preinst,v 1.5 2011/10/06 08:59:57 tg Exp $
set -e
# This maintainer script can be called the following ways:
#
# * new-preinst "install" [$old_version]
# * new-preinst "upgrade" [$old_version]
# * old-preinst "abort-upgrade" $new_version
# Essential packages and Pre-Depends are available. Pre-Depends have
# been configured once, but may be unpacked or Half-Configured only,
# or, for "abort-upgrade", Half-Installed if their upgrade failed.
case $1 in
install|upgrade)
# move directories to symlinks (once)
if test -z "$2" || \
dpkg --compare-versions "$2" lt '1:1.19.9'; then
rm -rf /var/lib/mediawiki/extensions/ConfirmEdit
rm -rf /var/lib/mediawiki/extensions/Gadgets
rm -rf /var/lib/mediawiki/extensions/Nuke
rm -rf /var/lib/mediawiki/extensions/ParserFunctions
rm -rf /var/lib/mediawiki/extensions/Renameuser
rm -rf /var/lib/mediawiki/extensions/Vector
rm -rf /var/lib/mediawiki/extensions/WikiEditor
fi
;;
abort-upgrade)
;;
*)
echo >&2 "preinst called with unknown subcommand '$1'"
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0
|