#!/bin/sh
if [ -z "${IPKG_INSTROOT:-}" ]; then
	/usr/libexec/istorec/dsh.sh rm 2>/dev/null || true
fi
root="${IPKG_INSTROOT:-}"
for directory in /usr/share/linkease/apps.d /usr/share/linkeasefull/desktop-apps.d; do
	registration="${root}${directory}/39-dsh.json"
	if [ "$(readlink "${registration}" 2>/dev/null)" = "/usr/share/dsh/dsh-plugin.json" ]; then
		rm -f "${registration}"
	fi
done
rmdir "${root}/usr/share/linkeasefull/desktop-apps.d" 2>/dev/null || true
exit 0
