Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 6558af41cfb66012c4cd986becf9d4a1 > scriptlet

openoffice.org-presenter-screen-3.2.1-0.3mdv2010.2.i586.rpm

PREUN

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

# %post report-builder
# upgrade 
# if [ $1 -ge 1 ];then
#	idextension=$(/usr/bin/unopkg list --shared 2> /dev/null | sed -ne 's/^Identifier: \(com.sun.reportdesigner\)/\1/p');
#	if [ "z$idextension" != "z" ]; then
#		/usr/bin/unopkg remove --shared $idextension 2> /dev/null
#		/usr/bin/unopkg list --shared &> /dev/null
#	fi
# fi
#install 
# /usr/bin/unopkg add --shared /usr/lib/ooo/sun-report-builder.oxt 2> /dev/null
# /usr/bin/unopkg list --shared &> /dev/null 

#uninstall
# %preun report-builder
# if [ $1 -eq 0 ];then
#	idextension=$(/usr/bin/unopkg list --shared 2> /dev/null | sed -ne 's/^Identifier: \(com.sun.reportdesigner\)/\1/p');
#	if [ "z$idextension" != "z" ]; then
#		/usr/bin/unopkg remove --shared $idextension 2> /dev/null
#		/usr/bin/unopkg list --shared &> /dev/null
#	fi
# fi

POSTIN

/bin/sh
# upgrade 
if [ $1 -ge 2 ];then
	idextension=$(/usr/bin/unopkg list --shared 2> /dev/null | sed -ne 's/^Identifier: \(com.sun.PresenterScreen-linux.*\)/\1/p');
	if [ "z$idextension" != "z" ]; then
		/usr/bin/unopkg remove --shared $idextension 2> /dev/null
		/usr/bin/unopkg list --shared &> /dev/null
	fi
fi
#install 
/usr/bin/unopkg add --shared /usr/lib/ooo/extensions/presenter-screen.oxt 2> /dev/null
/usr/bin/unopkg list --shared &> /dev/null