PREUN
/bin/sh
if [ $1 -eq 0 ];then
idpdfimport=$(unopkg3.0.1_64 list --shared 2> /dev/null | sed -ne 's/^Identifier: \(com.sun.star.PDFImport-linux.*\)/\1/p');
if [ "z$idpdfimport" != "z" ]; then
unopkg3.0.1_64 remove --shared $idpdfimport 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
# removes old installed pdfimport extension
idpdfimport=$(unopkg3.0.1_64 list --shared 2> /dev/null | sed -ne 's/^Identifier: \(com.sun.star.PDFImport-linux.*\)/\1/p');
if [ "z$idpdfimport" != "z" ]; then
unopkg3.0.1_64 remove --shared $idpdfimport 2> /dev/null
unopkg3.0.1_64 list --shared &> /dev/null
fi
fi
#install new pdfimport version
unopkg3.0.1_64 add --shared /usr/lib64/ooo-3.0.1_64/pdfimport.oxt 2> /dev/null
unopkg3.0.1_64 list --shared &> /dev/null
#uninstall