#!/bin/sh

set -e

if [ -f /etc/locale.purge ]
  then 
    /bin/mv /etc/locale.purge /etc/locale.purge-obsolete
    /usr/bin/mail -n -s "Upgrade of localepurge" root@localhost << EOF
    The configuration file /etc/locale.purge has become obsolete and
    can be safely removed from your system.  As reminder, it has been
    renamed to /etc/locale.purge-obsolete.

    Note please, that the removal mechanism of localepurge has been
    inverted.  It now keeps locales as listed in "/etc/locale.nopurge"
    and deletes the files contained in all else locale directories having 
    a LC_MESSAGES subdirectory.  So better be careful...
    
                                Yours truly, Root
EOF
fi
