termux-packages/x11-packages/shared-mime-info/postrm

12 lines
310 B
Plaintext
Raw Normal View History

2018-09-10 00:42:26 +02:00
#!/data/data/com.termux/files/usr/bin/sh
set -e
PREFIX="/data/data/com.termux/files/usr"
if [ "${1}" = purge ]; then
MIMEDIR="${PREFIX}/share/mime"
if [ -e "${MIMEDIR}" ]; then
cd "${MIMEDIR}" && rm -rf $(ls |grep -v ^packages$)
rmdir --ignore-fail-on-non-empty "${MIMEDIR}"
fi
fi