Blob Blame Raw
#!/bin/sh
CWD=$(pwd)
#TAG=HEAD
TAG=OPENBSD_4_4
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; }')"
cd ..
find calendar -type d -name CVS | xargs rm -rf
mv calendar calendar-${VER}
tar -cvf - calendar-${VER} | gzip -9c > calendar-${VER}.tar.gz
rm -rf calendar-${VER}