Version 1.9 :
[macros-openoffice.git] / auf-poste-client-reflets / debian / postinst
1 #!/bin/sh
2
3 set -e
4
5 add_extension() {
6   echo -n "Adding extension $1..."
7   INSTDIR=`mktemp -d`
8   if test -d "/usr/lib/openoffice/basis3.1"
9   then
10     export PYTHONPATH="/usr/lib/openoffice/basis3.1/program"
11     basis=`readlink /usr/lib/openoffice/basis-link`
12     /usr/lib/openoffice/program/unopkg add --shared $1 \
13       "-env:UserInstallation=file:///$INSTDIR" \
14       "-env:UNO_JAVA_JFW_INSTALL_DATA=file:///var/lib/openoffice/$basis/share/config/javasettingsunopkginstall.xml" \
15       "-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
16   else
17     /usr/lib/openoffice/program/unopkg add --shared $1 \
18       "-env:UserInstallation=file:///$INSTDIR" \
19       '-env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' \
20       "-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
21   fi
22   if [ -n $INSTDIR ]; then rm -rf $INSTDIR; fi
23   echo " done."
24 }
25
26 if [ "$1" = "configure" -o "$1" = "upgrade" ]; then
27   add_extension /usr/lib/openoffice/share/extension/install/auf-reflets-tse.oxt
28 fi
29
30 exit 0