#!/bin/sh
set -e
if [ "x$D" != "x" ]; then
	$INTERCEPT_DIR/postinst_intercept update_pixbuf_cache libgdk-pixbuf-2.0-loader-gif mlprefix= binprefix= libdir=/usr/lib \
		bindir=/usr/bin base_libdir=/usr/lib
else

	# Update the pixbuf loaders in case they haven't been registered yet
	/usr/lib/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache

	if [ -x /usr/bin/gtk-update-icon-cache ] && [ -d /usr/share/icons ]; then
		for icondir in /usr/share/icons/*; do
			if [ -d ${icondir} ]; then
				gtk-update-icon-cache -t -q ${icondir}
			fi
		done
	fi
fi
