From d92ee816b32fb92932cc5e453488eba519b8f9fc Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Thu, 23 Feb 2006 17:07:23 +0000 Subject: [PATCH] Stefan Fiedler: gtk+: add a postinstall script that creates icon cache files for gnome2 packages (using gtk-update-icon-cache) Index: package/gnome2/gtk+/postinstall.sh =================================================================== [2006011620463611485] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@7072 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/gnome2/gtk+/postinstall.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package/gnome2/gtk+/postinstall.sh diff --git a/package/gnome2/gtk+/postinstall.sh b/package/gnome2/gtk+/postinstall.sh new file mode 100644 index 000000000..0e74e6923 --- /dev/null +++ b/package/gnome2/gtk+/postinstall.sh @@ -0,0 +1,27 @@ + +# update gnome2 icon cache files for gnome2 directories that +# contain index.theme files + +echo "Gnome 2 icon cache files: running gtk-update-icon-cache..." + +all_installed "gnome2/share/.*/index.theme$" | +while read IDX; do + gtk-update-icon-cache "${IDX%index.theme}" +done + +# update gnome2 icon cache files for icon directories +# that don't contain an index.theme file + +all_touched "gnome2/share/.*/icons" | +while read FILE; do + DIR="${FILE%icons/*}icons" + [ ! -e "$DIR/index.theme" ] && + gtk-update-icon-cache --ignore-theme-index "$DIR" +done + +all_touched "gnome2/share/icons/hicolor" | +while read FILE; do + DIR="${FILE%hicolor/*}hicolor" + [ ! -e "$DIR/index.theme" ] && + gtk-update-icon-cache --ignore-theme-index "$DIR" +done