#!/bin/bash


topdir=$(pwd)
today=$(date +%Y%m%d)

mkdir -p ${topdir}/mtd-tmp
cd ${topdir}/mtd-tmp

export CVSROOT=':pserver:anoncvs@cvs.infradead.org:/home/cvs'
if ! grep -q '^.pserver.anoncvs.cvs.infradead.org..home.cvs' ~/.cvspass
then
	echo "$CVSROOT" 'Ay=0=h<Z' >>~/.cvspass
fi

cvs co mtd

cd mtd
cvs -d /net/wallace/home/ds/cvsroot co mtd/debian
mv mtd/debian debian
rm -rf mtd

cd ${topdir}/mtd-tmp
mv mtd mtd-${today}
tar -czf ../mtd-${today}.orig.tar.gz mtd-${today}

cd ${topdir}
rm -rf mtd-tmp

