preinst is in python-uno 1:3.5.4+dfsg2-0+deb7u6.
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 | #!/bin/bash
set -e
PLATFORMID=linux_x86_64
validate_extensions() {
INSTDIR=`mktemp -d`
if HOME=$INSTDIR /usr/lib/libreoffice/program/unopkg list --bundled >/dev/null 2>/dev/null; then
HOME=$INSTDIR /usr/lib/libreoffice/program/unopkg validate -v --bundled
fi
}
sync_extensions() {
INSTDIR=`mktemp -d`
export PYTHONPATH="/usr/lib/libreoffice/program"
if [ -L /usr/lib/libreoffice/basis-link ]; then
d=/var/lib/libreoffice/`readlink /usr/lib/libreoffice/basis-link`/
else
d=/usr/lib/libreoffice
fi
if HOME=$INSTDIR /usr/lib/libreoffice/program/unopkg list --bundled >/dev/null 2>/dev/null; then
if [ -e /usr/lib/libreoffice/share/prereg/bundled ] && readlink /usr/lib/libreoffice/share/prereg/bundled 2>&1 >/dev/null && [ -L $d/ure-link ]; then
HOME=$INSTDIR \
/usr/lib/libreoffice/program/unopkg sync -v --bundled \
"-env:BUNDLED_EXTENSIONS_USER=file:///usr/lib/libreoffice/share/prereg/bundled" \
"-env:UserInstallation=file://$INSTDIR" \
"-env:UNO_JAVA_JFW_INSTALL_DATA=file://$d/share/config/javasettingsunopkginstall.xml" \
"-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
fi
fi
rm -rf $INSTDIR
}
if [ "$1" = "upgrade" ]; then
if dpkg --compare-versions "$2" lt "1:3.5.2-2"; then
rm -rf /usr/lib/libreoffice/share/extensions/script-provider-for-python
sync_extensions
fi
fi
|