summaryrefslogtreecommitdiff
path: root/sysui/desktop/redhat
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2006-02-06 15:40:14 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2006-02-06 15:40:14 +0000
commit0b9ad96b61451d5356c61d10994e3881bb040129 (patch)
tree8d51f435c67580453ae5500262377266605e51d4 /sysui/desktop/redhat
parent1af128cfb6f6097be0bf8fe50b7b50e1105b9df0 (diff)
INTEGRATION: CWS cloph02 (1.21.22); FILE MERGED
2006/01/14 01:32:36 cloph 1.21.22.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:09 cloph 1.21.22.1: Issue number: #i57871# Submitted by: cloph
Diffstat (limited to 'sysui/desktop/redhat')
-rw-r--r--sysui/desktop/redhat/redhat-menus.spec28
1 files changed, 28 insertions, 0 deletions
diff --git a/sysui/desktop/redhat/redhat-menus.spec b/sysui/desktop/redhat/redhat-menus.spec
index 3487e2c01731..25045165f7ec 100644
--- a/sysui/desktop/redhat/redhat-menus.spec
+++ b/sysui/desktop/redhat/redhat-menus.spec
@@ -77,6 +77,22 @@ if [ -x /usr/bin/update-mime-database ]; then
update-mime-database /usr/share/mime
fi
+# run only on first install, since postun is run when updating
+# post would be run before the old files are removed
+if [ "$1" = "1" ] ; then # first install
+ 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
+
# update /etc/mime.types
# backing out existing entries to avoid duplicates
sed '
@@ -245,6 +261,18 @@ if [ "$1" = 0 ] ; then
update-mime-database /usr/share/mime
fi
fi
+#run always
+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
%files
%attr(0755,root,root) /usr/bin/soffice