Blob Blame Raw
#!/bin/sh

#TAG=HEAD
TAG=OPENBSD_5_5

CWD=$(pwd)
CVS_RSH=ssh ; export CVS_RSH
rm -rf calendar calendar-${VER}
mkdir calendar
cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs co \
    -d calendar -r ${TAG} src/usr.bin/calendar
cd calendar
VER="$(cvs status calendar.c | grep 'Working revision:' | awk '{ print $3; }')"
SNAPSHOT="$(date +%Y%m%d)cvs"
cd ..
find calendar -type d -name CVS | xargs rm -rf
mv calendar calendar-${VER}-${SNAPSHOT}
tar -cvf - calendar-${VER}-${SNAPSHOT} | gzip -9c > calendar-${VER}-${SNAPSHOT}.tar.gz
rm -rf calendar-${VER}-${SNAPSHOT}