summaryrefslogtreecommitdiff
path: root/autoscripts/postrm-icons
diff options
context:
space:
mode:
Diffstat (limited to 'autoscripts/postrm-icons')
-rw-r--r--autoscripts/postrm-icons15
1 files changed, 15 insertions, 0 deletions
diff --git a/autoscripts/postrm-icons b/autoscripts/postrm-icons
new file mode 100644
index 0000000..3765560
--- /dev/null
+++ b/autoscripts/postrm-icons
@@ -0,0 +1,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