#!/bin/sh

VER=`sed -n -e "s/^PACKAGE_VERSION='\\(.*\\)'$/\1/p" configure`

if test x$1 = xcvs; then
  VER="${VER}-cvs"`date +%Y%m%d`
fi

for i in copyright.in changelog.in control.in; do
  sed "s/@VERSION@/$VER/g" debian/$i > debian/`basename $i .in`
done

