PREUN
/bin/sh
if [ $1 -eq 0 ];then
idlangtool=$(unopkg list --shared 2> /dev/null | sed -ne 's/^Identifier: \(org.openoffice.languagetool.oxt.*\)/\1/p');
if [ "z$idlangtool" != "z" ]; then
unopkg remove --shared $idlangtool 2> /dev/null
#clean footprint cache
unopkg list --shared &> /dev/null
fi
fi
POSTIN
/bin/sh
# upgrade
if [ $1 -ge 2 ];then
idlangtool=$(unopkg list --shared 2> /dev/null | sed -ne 's/^Identifier: \(org.openoffice.languagetool.oxt.*\)/\1/p');
if [ "z$idlangtool" != "z" ]; then
unopkg remove --shared $idlangtool 2> /dev/null
unopkg list --shared &> /dev/null
fi
fi
unopkg add --shared /usr/lib/ooo/LanguageTool-0.9.9.oxt 2> /dev/null
unopkg list --shared &> /dev/null
#uninstall
Triggers
openoffice.org-core =
1:3.1.1
/bin/sh
[ $2 -eq 0 ] || exit 0
# openoffice.org upgrade, it's reinstalling the extension for safe
idlangtool=$(unopkg list --shared 2> /dev/null | sed -ne 's/^Identifier: \(org.openoffice.languagetool.oxt.*\)/\1/p');
unopkg remove --shared $idlangtool 2> /dev/null
unopkg list --shared &> /dev/null
unopkg add --shared /usr/lib/ooo/LanguageTool-0.9.9.oxt 2> /dev/null
unopkg list --shared &> /dev/null