De retour de congés...
[macros-openoffice.git] / auf-poste-client-reflets / debian / preinst
CommitLineData
73de9e1e
P
1#!/bin/sh
2
73de9e1e
P
3set -e
4
5flush_unopkg_cache() {
6 /usr/lib/openoffice/program/unopkg list --shared > /dev/null 2>&1
7}
8
9remove_extension() {
10 if /usr/lib/openoffice/program/unopkg list --shared $1 >/dev/null; then
11 echo -n "Removing extension $1..."
12 INSTDIR=`mktemp -d`
13 /usr/lib/openoffice/program/unopkg remove --shared $1 \
14 "-env:UserInstallation=file://$INSTDIR" \
588ad7df 15 '-env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' \
73de9e1e
P
16 "-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
17 if [ -n $INSTDIR ]; then rm -rf $INSTDIR; fi
18 echo " done."
19 flush_unopkg_cache
20 fi
21}
22
23if [ "$1" = "upgrade" ]; then
24 # this is a legacy package, so we need to find it first...
a80ac883 25 id=`/usr/lib/openoffice/program/unopkg list --shared | grep Identifier:.*auf.*reflets | cut -d":" -f2`
73de9e1e
P
26 remove_extension $id
27fi
28
29exit 0