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