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