#!@TERMUX_PREFIX@/bin/bash

if [[ "${1}" = "remove" || "@TERMUX_PACKAGE_FORMAT@" = "pacman" ]]; then
    if [[ -d "@TERMUX_PREFIX@/share/applications" ]]; then
        rm -f "@TERMUX_PREFIX@/share/applications/mimeinfo.cache"
        rmdir --ignore-fail-on-non-empty "@TERMUX_PREFIX@/share/applications"
    fi
fi

exit 0
