#!/bin/sh
set -e

NAME=scons

dpkg --listfiles $NAME |
        awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
        xargs rm -f >&2

if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/scons ]; then
	rm -f /usr/doc/scons
fi
