[ -d #ICONDIR# ] && touch -m #ICONDIR# || true
if [ "$1" = "remove" ] && \
   [ -x "`which gtk-update-icon-cache 2>/dev/null`" ] && \
   [ -f /etc/gtk-2.0/gdk-pixbuf.loaders ]; then
   	if [ "`find #ICONDIR# -mindepth 1 -maxdepth 1 -type d | wc -l`" -gt 0 ] && \
	   [ "`find #ICONDIR# -mindepth 1 -maxdepth 1 -type f -name index.theme | wc -l`" -eq 1 ]; then
   		# we shouldn't bomb out, if gtk-update-icon-cache failes, 
		# it's not important enough
		gtk-update-icon-cache -q #ICONDIR# || true;
	else
		# if the icon theme directory has no subdirs, we can remove the cache
		rm -f #ICONDIR#/icon-theme.cache || true;
	fi
fi
