#!/bin/sh
set -e
if [ "$1" = "configure" ]; then
	if [ -d /usr/doc -a ! -e /usr/doc/pms -a -d /usr/share/doc/pms ]; then
		ln -sf ../share/doc/pms /usr/doc/pms
	fi
fi

PMS_DIR='/usr/lib/pms/python/PMS'
case "$1" in
	configure|abort-upgrade|abort-remove|abort-deconfigure)
		/usr/bin/python -O -c 'from compileall import main;main()' -q $PMS_DIR
		/usr/bin/python -c 'from compileall import main;main()' -q $PMS_DIR
	;;
esac
