#!/bin/sh -e

if [ -e /usr/src/debian-cd ]; then
  if [ "$1" = upgrade -o "$1" = install ];then
    if dpkg --compare-versions "$2" lt 1.99.14-1 ; then
      cat <<!EOT!

ERROR: /usr/src/debian-cd already exists.
       I don't want to clobber anything that you might have put in there,
       so please move it out of the way or remove it, and then re-install
       this package.


!EOT!
      exit 1
    fi
  fi
fi
