#!/bin/sh set -e if [ "$1" = purge ]; then MIMEDIR="/usr/share/mime" if [ -e $MIMEDIR ]; then cd $MIMEDIR && rm -rf $(ls |grep -v ^packages$) rmdir --ignore-fail-on-non-empty $MIMEDIR fi fi