diff options
Diffstat (limited to 'autoscripts')
-rw-r--r-- | autoscripts/postinst-icons | 7 | ||||
-rw-r--r-- | autoscripts/postrm-icons | 15 |
2 files changed, 22 insertions, 0 deletions
diff --git a/autoscripts/postinst-icons b/autoscripts/postinst-icons new file mode 100644 index 00000000..3c018b35 --- /dev/null +++ b/autoscripts/postinst-icons @@ -0,0 +1,7 @@ +if which gtk-update-icon-cache >/dev/null 2>&1; then
+ for dir in #DIRLIST#; do
+ if [ -f "$dir"/icon-theme.cache ]; then
+ gtk-update-icon-cache --force --quiet "$dir"
+ fi
+ done
+fi
diff --git a/autoscripts/postrm-icons b/autoscripts/postrm-icons new file mode 100644 index 00000000..3765560c --- /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
|