# 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 usr/share/doc/Terminal/es ; rm -rf images )
( cd usr/share/doc/Terminal/es ; ln -sf ../C/images images )
( cd usr/share/doc/Terminal/ca ; rm -rf images )
( cd usr/share/doc/Terminal/ca ; ln -sf ../C/images images )
( cd usr/share/doc/Terminal/it ; rm -rf images )
( cd usr/share/doc/Terminal/it ; ln -sf ../C/images images )
( cd usr/share/doc/Terminal/ru ; rm -rf images )
( cd usr/share/doc/Terminal/ru ; ln -sf ../C/images images )
( cd usr/share/doc/Terminal/fr ; rm -rf images )
( cd usr/share/doc/Terminal/fr ; ln -sf ../C/images images )
( cd usr/share/doc/Terminal/gl ; rm -rf images )
( cd usr/share/doc/Terminal/gl ; ln -sf ../C/images images )
( cd usr/share/doc/Terminal/el ; rm -rf images )
( cd usr/share/doc/Terminal/el ; ln -sf ../C/images images )
( cd usr/share/doc/Terminal/da ; rm -rf images )
( cd usr/share/doc/Terminal/da ; ln -sf ../C/images images )
( cd usr/share/doc/Terminal/zh_CN ; rm -rf images )
( cd usr/share/doc/Terminal/zh_CN ; ln -sf ../C/images images )
( cd usr/share/doc/Terminal/ug ; rm -rf images )
( cd usr/share/doc/Terminal/ug ; ln -sf ../C/images images )
( cd usr/share/doc/Terminal/sv ; rm -rf images )
( cd usr/share/doc/Terminal/sv ; ln -sf ../C/images images )
( cd usr/share/doc/Terminal/pt ; rm -rf images )
( cd usr/share/doc/Terminal/pt ; ln -sf ../C/images images )
( cd usr/share/doc/Terminal/id ; rm -rf images )
( cd usr/share/doc/Terminal/id ; ln -sf ../C/images images )
( cd usr/bin ; rm -rf terminal )
( cd usr/bin ; ln -sf Terminal terminal )
