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

12 lines
310 B
Bash
Executable File

#!/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