#!/bin/sh -e

DISTS="oldstable-security stable stable-security testing testing-security unstable"
if [ "$1" = "configure" ]; then
    if [ -z "$2" ]; then
	:
    else
	if dpkg --compare-versions "$2" lt "20050108"; then
	    for d in $DISTS; do
		rm -f "/etc/source-dependencies-$d"
	    done
	fi
    fi
    if [ ! -e /etc/sbuild.conf.local ]; then
	zcat /usr/share/doc/sbuild/examples/sbuild.conf.local.gz > /etc/sbuild.conf.local
    fi
fi
