Sophie

Sophie

distrib > Mandriva > 2011.0 > x86_64 > media > main-release > by-pkgid > c26abc05dfa6258f71d96cb772d17e48 > scriptlet

libreoffice-pdfimport-3.4.2-2.1.x86_64.rpm

PREUN

/bin/sh
if [ $1 -eq 0 ];then
	idpdfimport=$(/usr/bin/unopkg list --shared 2> /dev/null | sed -ne 's/^Identifier: \(com.sun.star.PDFImport-linux.*\)/\1/p');
	if [ "z$idpdfimport" != "z" ]; then
		/usr/bin/unopkg remove --shared $idpdfimport 2> /dev/null
		#clean footprint cache
		/usr/bin/unopkg list --shared &> /dev/null
	fi
fi

POSTIN

/bin/sh
# upgrade 
if [ $1 -ge 2 ];then
	# removes old installed pdfimport extension 
	idpdfimport=$(/usr/bin/unopkg list --shared 2> /dev/null | sed -ne 's/^Identifier: \(com.sun.star.PDFImport-linux.*\)/\1/p');
	if [ "z$idpdfimport" != "z" ]; then
		/usr/bin/unopkg remove --shared $idpdfimport 2> /dev/null
		/usr/bin/unopkg list --shared &> /dev/null
	fi
fi

#install new pdfimport version
/usr/bin/unopkg add --shared /usr/lib64/libreoffice/extensions/pdfimport.oxt 2> /dev/null
/usr/bin/unopkg list --shared &> /dev/null 

#uninstall