#! /bin/sh
#
# cannabalized (by tca@gnu.org) debian prerm script for
# Python x.y hierarchical modules
# Written by Gregor Hoffleit <flight@debian.org>
# Extended by Matthias Klose <doko@debian.org>
#

set -e

PV="2.2"
DIRLIST="/usr/share/solfege"

# Fix for old mistakes before 1.2.1-2
rm -f /etc/gnome/config/solfege0.7
rm -f /etc/gnome/config/solfege1.0
rm -f /etc/gnome/config/solfege1.1
# end old mistakes

# Converting rc file from 1.2 is not supported
rm -f /etc/gnome/config/solfege1.2
# end Convert

case "$1" in
    configure|abort-upgrade|abort-remove|abort-deconfigure)
	for i in $DIRLIST ; do
	    /usr/bin/python$PV -O /usr/lib/python$PV/compileall.py -q $i
	    /usr/bin/python$PV /usr/lib/python$PV/compileall.py -q $i
	done
    ;;

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

#DEBHELPER#
