#!/bin/sh
# dpkg will not replace a real directory with a symlink.
# FIXME: Remove during the wheezy+1 cycle.

set -e
set -u

RESDIR=/usr/lib/GNUstep/ApplicationSupport/GNUMail

case "$1" in
    install | upgrade)
	if [ -d $RESDIR/PGP.bundle/Resources ] \
	    && [ ! -L $RESDIR/PGP.bundle/Resources ]; then
	    for d in $RESDIR/*; do rm -rf $d/Resources;	done
	fi
    ;;
    
    abort-upgrade)
    ;;

    *)
	echo "preinst called with unknown argument \`$1'" >&2
	exit 1
    ;;
esac

#DEBHELPER#

exit 0
