4 # No parameter required, all RPMs listed in $HOME/.RPM_OFFICEDATABASE
10 echo "Usage:" $0 "<office-installation-dir>"
11 echo " <inst-destination-dir>: directory where the office to be removed is installed"
18 # Check for old style .RPM_OFFICEDATABASE first
19 if [ -d ${INSTALLDIR}/.RPM_OFFICEDATABASE
]; then
20 RPM_DB_PATH
=${INSTALLDIR}/.RPM_OFFICEDATABASE
22 RPM_DB_PATH
=${INSTALLDIR}/.RPM_DATABASE
25 # the RPM_DB_PATH must be absolute
26 if [ ! "${RPM_DB_PATH:0:1}" = "/" ]; then
27 RPM_DB_PATH
=`cd ${RPM_DB_PATH}; pwd`
30 RPMLIST
=`rpm --dbpath $RPM_DB_PATH --query --all`
34 echo "#########################################"
35 echo "# Deinstallation of Office RPMs #"
36 echo "#########################################"
38 echo "Path to the RPM database: " $RPM_DB_PATH
39 echo "RPMs to deinstall:"
41 echo "===================================================================="
44 # Restore original bootstraprc
45 mv -f $1/program
/bootstraprc.orig
$1/program
/bootstraprc
47 rpm
--dbpath $RPM_DB_PATH --erase $RPMLIST ||
exit 2
49 echo "Removing RPM database ..."
53 echo "Deinstallation done."