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

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