# update rarian database
if [ -x usr/bin/rarian-sk-update ]; then
  usr/bin/rarian-sk-update 1> /dev/null 2> /dev/null
fi

# update mime database
if [ -x usr/bin/update-mime-database ]; then
  usr/bin/update-mime-database usr/share/mime 1> /dev/null 2> /dev/null
fi

# update desktop entries
if [ -x usr/bin/update-desktop-database ]; then
  usr/bin/update-desktop-database 1> /dev/null 2> /dev/null
fi

# update hicolor icons
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
	rm -f usr/share/icons/hicolor/icon-theme.cache
fi
usr/bin/gtk-update-icon-cache -f -q usr/share/icons/hicolor 1>/dev/null 2>/dev/null

if [ -x /usr/bin/glib-compile-schemas ]; then
  /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas/ >/dev/null 2>&1
fi

# Restart gconfd-2 if running to reload new gconf settings
if ps acx | grep -q gconfd-2 ; then
        killall -HUP gconfd-2 ;
fi

# A good idea whenever kernel modules are added or changed:
if [ -x sbin/depmod ]; then
  /sbin/depmod -a 1> /dev/null 2> /dev/null
fi

( cd opt/libreoffice3.6/program ; rm -rf libicudata.so.49 )
( cd opt/libreoffice3.6/program ; ln -sf libicudata.so.49.1.1 libicudata.so.49 )
( cd opt/libreoffice3.6/program ; rm -rf libicui18n.so.49 )
( cd opt/libreoffice3.6/program ; ln -sf libicui18n.so.49.1.1 libicui18n.so.49 )
( cd opt/libreoffice3.6/program ; rm -rf libicule.so.49 )
( cd opt/libreoffice3.6/program ; ln -sf libicule.so.49.1.1 libicule.so.49 )
( cd opt/libreoffice3.6/program ; rm -rf libicuuc.so.49 )
( cd opt/libreoffice3.6/program ; ln -sf libicuuc.so.49.1.1 libicuuc.so.49 )
( cd opt/libreoffice3.6/program ; rm -rf libpython2.6.so )
( cd opt/libreoffice3.6/program ; ln -sf libpython2.6.so.1.0 libpython2.6.so )
( cd opt/libreoffice3.6/ure/bin ; rm -rf regcomp )
( cd opt/libreoffice3.6/ure/bin ; ln -sf startup.sh regcomp )
( cd opt/libreoffice3.6/ure/bin ; rm -rf uno )
( cd opt/libreoffice3.6/ure/bin ; ln -sf startup.sh uno )
( cd opt/libreoffice3.6 ; rm -rf ure-link )
( cd opt/libreoffice3.6 ; ln -sf ure ure-link )
( cd usr/bin ; rm -rf libreoffice3.6 )
( cd usr/bin ; ln -sf /opt/libreoffice3.6/program/soffice libreoffice3.6 )
( cd usr/bin ; rm -rf sbase )
( cd usr/bin ; ln -sf ../../opt/libreoffice3.6/program/sbase sbase )
( cd usr/bin ; rm -rf scalc )
( cd usr/bin ; ln -sf ../../opt/libreoffice3.6/program/scalc scalc )
( cd usr/bin ; rm -rf sdraw )
( cd usr/bin ; ln -sf ../../opt/libreoffice3.6/program/sdraw sdraw )
( cd usr/bin ; rm -rf simpress )
( cd usr/bin ; ln -sf ../../opt/libreoffice3.6/program/simpress simpress )
( cd usr/bin ; rm -rf smath )
( cd usr/bin ; ln -sf ../../opt/libreoffice3.6/program/smath smath )
( cd usr/bin ; rm -rf soffice )
( cd usr/bin ; ln -sf ../../opt/libreoffice3.6/program/soffice soffice )
( cd usr/bin ; rm -rf spadmin )
( cd usr/bin ; ln -sf ../../opt/libreoffice3.6/program/spadmin spadmin )
( cd usr/bin ; rm -rf swriter )
( cd usr/bin ; ln -sf ../../opt/libreoffice3.6/program/swriter swriter )
( cd usr/bin ; rm -rf unopkg )
( cd usr/bin ; ln -sf ../../opt/libreoffice3.6/program/unopkg unopkg )
( cd usr/share/applications ; rm -rf libreoffice3.6-base.desktop )
( cd usr/share/applications ; ln -sf /opt/libreoffice3.6/share/xdg/base.desktop libreoffice3.6-base.desktop )
( cd usr/share/applications ; rm -rf libreoffice3.6-binfilter.desktop )
( cd usr/share/applications ; ln -sf /opt/libreoffice3.6/share/xdg/binfilter.desktop libreoffice3.6-binfilter.desktop )
( cd usr/share/applications ; rm -rf libreoffice3.6-calc.desktop )
( cd usr/share/applications ; ln -sf /opt/libreoffice3.6/share/xdg/calc.desktop libreoffice3.6-calc.desktop )
( cd usr/share/applications ; rm -rf libreoffice3.6-draw.desktop )
( cd usr/share/applications ; ln -sf /opt/libreoffice3.6/share/xdg/draw.desktop libreoffice3.6-draw.desktop )
( cd usr/share/applications ; rm -rf libreoffice3.6-impress.desktop )
( cd usr/share/applications ; ln -sf /opt/libreoffice3.6/share/xdg/impress.desktop libreoffice3.6-impress.desktop )
( cd usr/share/applications ; rm -rf libreoffice3.6-javafilter.desktop )
( cd usr/share/applications ; ln -sf /opt/libreoffice3.6/share/xdg/javafilter.desktop libreoffice3.6-javafilter.desktop )
( cd usr/share/applications ; rm -rf libreoffice3.6-math.desktop )
( cd usr/share/applications ; ln -sf /opt/libreoffice3.6/share/xdg/math.desktop libreoffice3.6-math.desktop )
( cd usr/share/applications ; rm -rf libreoffice3.6-printeradmin.desktop )
( cd usr/share/applications ; ln -sf /opt/libreoffice3.6/share/xdg/printeradmin.desktop libreoffice3.6-printeradmin.desktop )
( cd usr/share/applications ; rm -rf libreoffice3.6-startcenter.desktop )
( cd usr/share/applications ; ln -sf /opt/libreoffice3.6/share/xdg/startcenter.desktop libreoffice3.6-startcenter.desktop )
( cd usr/share/applications ; rm -rf libreoffice3.6-writer.desktop )
( cd usr/share/applications ; ln -sf /opt/libreoffice3.6/share/xdg/writer.desktop libreoffice3.6-writer.desktop )
( cd usr/share/applications ; rm -rf libreoffice3.6-xsltfilter.desktop )
( cd usr/share/applications ; ln -sf /opt/libreoffice3.6/share/xdg/xsltfilter.desktop libreoffice3.6-xsltfilter.desktop )
