#!/bin/bash
## Remove parts of the previous middleware if they exist
# only remove sub folders of "/Library/Belgium Identity Card/", as other eid modules might be installed in there
if test -e "/Library/Belgium Identity Card"; then
	rm -rf "/Library/Belgium Identity Card/eID Middleware.app"
	rm -rf "/Library/Belgium Identity Card/Licenses"
fi
if test -e "/Library/BelgiumIdentityCard"; then
	rm -rf "/Library/BelgiumIdentityCard"
fi
if test -e "/usr/local/lib/beid-pkcs11.bundle"; then
    rm -rf "/usr/local/lib/beid-pkcs11.bundle"
fi
