#! /bin/csh -f
#
cd /home/miriad/nightly
setenv CVSROOT  :pserver:anonymous@cvs.astro.umd.edu:/home/cvsroot
if (-d miriad_cvs) then
  echo Removing old nightly CVS source miriad_cvs
  rm -rf miriad_cvs
endif
echo cvs co -d miriad_cvs miriad
cvs -Q co -d miriad_cvs miriad
cd miriad_cvs
set version=(`cat VERSION`)
echo "$version - [Nightly `date`]" > VERSION
echo cvs co wip
(cd borrow; cvs -Q co wip; cvs -Q co rad)
echo ':pserver:anonymous@cvs.astro.umd.edu:/home/cvsroot A' > .cvspass
cd ..
tar zcf miriad.tar.gz miriad_cvs
echo this VERSION: `cat miriad_cvs/VERSION`