From b0b654efe44f47dcca2b37e81ce51f79d6dd444b Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Mon, 9 Oct 2006 17:42:16 +0000 Subject: [PATCH] Stefan Fiedler: gtk+: replace cron job with postinstall script NOT TESTED yet [2006092517363061200] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@7937 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/gnome2/gtk+/gdkpixbuf.cron | 25 ------------------------- package/gnome2/gtk+/postinstall.sh | 24 +++++++++++++++++++++--- 2 files changed, 21 insertions(+), 28 deletions(-) delete mode 100644 package/gnome2/gtk+/gdkpixbuf.cron diff --git a/package/gnome2/gtk+/gdkpixbuf.cron b/package/gnome2/gtk+/gdkpixbuf.cron deleted file mode 100644 index 1e9bba692..000000000 --- a/package/gnome2/gtk+/gdkpixbuf.cron +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# --- ROCK-COPYRIGHT-NOTE-BEGIN --- -# -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# Please add additional copyright information _after_ the line containing -# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by -# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! -# -# ROCK Linux: rock-src/package/gnome2/gtk+/gdkpixbuf.cron -# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. A copy of the GNU General Public -# License can be found at Documentation/COPYING. -# -# Many people helped and are helping developing ROCK Linux. Please -# have a look at http://www.rocklinux.org/ and the Documentation/TEAM -# file for details. -# -# --- ROCK-COPYRIGHT-NOTE-END --- - -/D_prefix/bin/gdk-pixbuf-query-loaders \ - > /D_sysconfdir/gtk-2.0/gdk-pixbuf.loaders diff --git a/package/gnome2/gtk+/postinstall.sh b/package/gnome2/gtk+/postinstall.sh index 0e74e6923..d2f3b91a1 100644 --- a/package/gnome2/gtk+/postinstall.sh +++ b/package/gnome2/gtk+/postinstall.sh @@ -1,11 +1,17 @@ +/D_prefix/bin/gdk-pixbuf-query-loaders \ + > /D_sysconfdir/gtk-2.0/gdk-pixbuf.loaders + # update gnome2 icon cache files for gnome2 directories that # contain index.theme files -echo "Gnome 2 icon cache files: running gtk-update-icon-cache..." - +print_status=1 all_installed "gnome2/share/.*/index.theme$" | while read IDX; do + [ $print_status = 1 ] && \ + { echo "Gnome 2 icon cache files: running gtk-update-icon-cache..." + print_status=0 ; } + gtk-update-icon-cache "${IDX%index.theme}" done @@ -16,12 +22,24 @@ all_touched "gnome2/share/.*/icons" | while read FILE; do DIR="${FILE%icons/*}icons" [ ! -e "$DIR/index.theme" ] && + { + [ $print_status = 1 ] && \ + { echo "Gnome 2 icon cache files: running gtk-update-icon-cache..." + print_status=0 ; } + 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" ] && + [ ! -e "$DIR/index.theme" ] && + { + [ $print_status = 1 ] && \ + { echo "Gnome 2 icon cache files: running gtk-update-icon-cache..." + print_status=0 ; } + gtk-update-icon-cache --ignore-theme-index "$DIR" + } done