summaryrefslogtreecommitdiff
path: root/extra/shared-mime-info/shared-mime-info.install
diff options
context:
space:
mode:
Diffstat (limited to 'extra/shared-mime-info/shared-mime-info.install')
-rw-r--r--extra/shared-mime-info/shared-mime-info.install15
1 files changed, 15 insertions, 0 deletions
diff --git a/extra/shared-mime-info/shared-mime-info.install b/extra/shared-mime-info/shared-mime-info.install
new file mode 100644
index 000000000..fac0c1c79
--- /dev/null
+++ b/extra/shared-mime-info/shared-mime-info.install
@@ -0,0 +1,15 @@
+post_install() {
+ update-mime-database usr/share/mime > /dev/null 2>&1
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ if [ -d usr/share/mime ]; then
+ rm -f usr/share/mime/{globs,globs2,icons,treemagic,generic-icons,types,magic,XMLnamespaces,subclasses,aliases,mime.cache}
+ rm -rf usr/share/mime/{application,audio,image,inode,message,model,multipart,text,video,x-content,x-epoc}
+ rmdir --ignore-fail-on-non-empty usr/share/mime
+ fi
+}