summaryrefslogtreecommitdiff
path: root/autoscripts/postrm-icons
blob: 3765560cb370e029f68646bf591d2fefb3be3e5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
if [ "$1" = "remove" ]; then
	for dir in #DIRLIST#; do
		if [ -d "$dir" ]; then
			if [ -f "$dir"/index.theme ] && \
			   [ -f "$dir"/icon-theme.cache ] && \
			   which gtk-update-icon-cache >/dev/null 2>&1
			then
				gtk-update-icon-cache --force --quiet "$dir"
			else
				rm -f "$dir"/icon-theme.cache
				rmdir -p --ignore-fail-on-non-empty "$dir"
			fi
		fi
	done
fi