termux-packages/x11-packages/shared-mime-info/postrm
2022-04-18 14:45:37 +05:30

14 lines
466 B
Bash
Executable File

#!/data/data/com.termux/files/usr/bin/bash
set -e
PREFIX="/data/data/com.termux/files/usr"
if [ "${1}" = purge ]; then
MIMEDIR="${PREFIX}/share/mime"
if [ -d "${MIMEDIR}" ]; then
rm -f "${MIMEDIR}"/{globs,globs2,icons,treemagic,generic-icons,types,magic,XMLnamespaces,subclasses,aliases,mime.cache}
rm -rf "${MIMEDIR}"/{application,audio,image,inode,message,model,multipart,text,video,x-content,x-epoc}
rmdir --ignore-fail-on-non-empty "${MIMEDIR}"
fi
fi