#!/bin/csh -f
# This explains the cdrom build strategy.

# /usr/local/cdimage/root is where the working copy of the new cd is built.
# /usr/local/telescope is a link to /usr/local/cdimage/root/telescope
# /usr/local/gsc is a link to /usr/local/cdimage/root/gsc
# /home/ocaas is a link to /usr/local/cdimage/root/home
# /usr/local/cdimage/image1.raw is the iso9660 fs image.

# with the above set up, burn a new cd as follows:

# set new release number
set REV = 2_0_11
set TAG = "OCAAS$REV"

# bump VERSION
cd ~/telescope/cdimage
co -l VERSION
echo $REV > VERSION
ci -m'bump' -u VERSION

# tag all with new release
cd ~/telescope
rcstag $TAG

# but xephem stays at OCAAS 2_0_6
cd ~/telescope/GUI/xephem
rcstree -i rcs -N"$TAG":OCAAS2_0_6

# build new release
cd ~
su -c "rm -fr /usr/local/telescope/*"
Make.all -reset -release $TAG jsf-halfm >& M
su -c "Make.pass pass8a jsf-halfm"
telbu
cd ~/telescope/cdimage
# change key in burn?
su -c ./burn
