office-gobmx/sysui/desktop/debian/postrm
Rüdiger Timm 1d85fe3cb9 INTEGRATION: CWS cloph02 (1.3.46); FILE MERGED
2006/01/14 01:32:26 cloph 1.3.46.2: Issue number: #i57871#
Submitted by: cloph
Don't assume the script can find the binary to update the icon-cache.. Check for existence of the cache, then touch the theme-dir to invalidate the cache and then try to update the cache.
2005/12/12 19:27:07 cloph 1.3.46.1: Issue number: #i57871#
Submitted by: cloph
2006-02-06 15:39:31 +00:00

26 lines
850 B
Bash

#!/bin/sh
# run always - both when upgrading as well as when erasing the package.
# Make sure this works when converted to .deb using alien.
if [ "$1" != "purge" ]; then
if [ -x /usr/bin/update-mime-database ]; then
update-mime-database /usr/share/mime
fi
if [ -x /usr/bin/update-desktop-database ]; then
update-desktop-database -q /usr/share/applications
fi
if [ -x /usr/bin/update-menus ]; then
update-menus
fi
for theme in gnome hicolor locolor; do
if [ -e /usr/share/icons/$theme/icon-theme.cache ] ; then
# touch it, just in case we cannot find the binary...
touch /usr/share/icons/$theme
if (which gtk-update-icon-cache); then
gtk-update-icon-cache /usr/share/icons/$theme
fi
# ignore errors (e.g. when there is a cache, but no index.theme)
true
fi
done
fi
exit 0