# 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

( cd usr/man/man5 ; rm -rf gimprc.5 )
( cd usr/man/man5 ; ln -sf gimprc-2.8.5 gimprc.5 )
( cd usr/man/man1 ; rm -rf gimp-console.1 )
( cd usr/man/man1 ; ln -sf gimp-console-2.8.1 gimp-console.1 )
( cd usr/man/man1 ; rm -rf gimp-console-2.8.1 )
( cd usr/man/man1 ; ln -sf gimp-2.8.1 gimp-console-2.8.1 )
( cd usr/man/man1 ; rm -rf gimp.1 )
( cd usr/man/man1 ; ln -sf gimp-2.8.1 gimp.1 )
( cd usr/lib ; rm -rf libgimpmath-2.0.so )
( cd usr/lib ; ln -sf libgimpmath-2.0.so.0.800.16 libgimpmath-2.0.so )
( cd usr/lib ; rm -rf libgimp-2.0.so )
( cd usr/lib ; ln -sf libgimp-2.0.so.0.800.16 libgimp-2.0.so )
( cd usr/lib ; rm -rf libgimpui-2.0.so.0 )
( cd usr/lib ; ln -sf libgimpui-2.0.so.0.800.16 libgimpui-2.0.so.0 )
( cd usr/lib ; rm -rf libgimpbase-2.0.so )
( cd usr/lib ; ln -sf libgimpbase-2.0.so.0.800.16 libgimpbase-2.0.so )
( cd usr/lib ; rm -rf libgimpui-2.0.so )
( cd usr/lib ; ln -sf libgimpui-2.0.so.0.800.16 libgimpui-2.0.so )
( cd usr/lib ; rm -rf libgimpmodule-2.0.so )
( cd usr/lib ; ln -sf libgimpmodule-2.0.so.0.800.16 libgimpmodule-2.0.so )
( cd usr/lib ; rm -rf libgimpconfig-2.0.so )
( cd usr/lib ; ln -sf libgimpconfig-2.0.so.0.800.16 libgimpconfig-2.0.so )
( cd usr/lib ; rm -rf libgimpbase-2.0.so.0 )
( cd usr/lib ; ln -sf libgimpbase-2.0.so.0.800.16 libgimpbase-2.0.so.0 )
( cd usr/lib ; rm -rf libgimpthumb-2.0.so )
( cd usr/lib ; ln -sf libgimpthumb-2.0.so.0.800.16 libgimpthumb-2.0.so )
( cd usr/lib ; rm -rf libgimpthumb-2.0.so.0 )
( cd usr/lib ; ln -sf libgimpthumb-2.0.so.0.800.16 libgimpthumb-2.0.so.0 )
( cd usr/lib ; rm -rf libgimpmodule-2.0.so.0 )
( cd usr/lib ; ln -sf libgimpmodule-2.0.so.0.800.16 libgimpmodule-2.0.so.0 )
( cd usr/lib ; rm -rf libgimp-2.0.so.0 )
( cd usr/lib ; ln -sf libgimp-2.0.so.0.800.16 libgimp-2.0.so.0 )
( cd usr/lib ; rm -rf libgimpcolor-2.0.so )
( cd usr/lib ; ln -sf libgimpcolor-2.0.so.0.800.16 libgimpcolor-2.0.so )
( cd usr/lib ; rm -rf libgimpconfig-2.0.so.0 )
( cd usr/lib ; ln -sf libgimpconfig-2.0.so.0.800.16 libgimpconfig-2.0.so.0 )
( cd usr/lib ; rm -rf libgimpmath-2.0.so.0 )
( cd usr/lib ; ln -sf libgimpmath-2.0.so.0.800.16 libgimpmath-2.0.so.0 )
( cd usr/lib ; rm -rf libgimpwidgets-2.0.so )
( cd usr/lib ; ln -sf libgimpwidgets-2.0.so.0.800.16 libgimpwidgets-2.0.so )
( cd usr/lib ; rm -rf libgimpcolor-2.0.so.0 )
( cd usr/lib ; ln -sf libgimpcolor-2.0.so.0.800.16 libgimpcolor-2.0.so.0 )
( cd usr/lib ; rm -rf libgimpwidgets-2.0.so.0 )
( cd usr/lib ; ln -sf libgimpwidgets-2.0.so.0.800.16 libgimpwidgets-2.0.so.0 )
( cd usr/bin ; rm -rf gimp-console )
( cd usr/bin ; ln -sf gimp-console-2.8 gimp-console )
( cd usr/bin ; rm -rf gimp )
( cd usr/bin ; ln -sf gimp-2.8 gimp )
