1 |
#!/bin/bash |
2 |
# |
3 |
# Giuseppe Vacanti (cosine science & computing) February 2001 |
4 |
# |
5 |
# Build latest CIFs for public and public+development CCFs |
6 |
# |
7 |
# $Id$ |
8 |
# |
9 |
|
10 |
# The public one will always have a CALINDEX, so use that one. |
11 |
|
12 |
find_calindex () { |
13 |
if [ $# -ne 1 ] ; then echo $0; exit 1 ; fi |
14 |
odfdir=$1 |
15 |
ls $odfdir/*CALINDEX*CCF | sort -r | head -1 |
16 |
} |
17 |
|
18 |
. $HOME/bin/ccflib.cfg |
19 |
|
20 |
saslatest |
21 |
cifbuild -v > /dev/null 2>&1 || (echo ERROR: cifbuild missing; exit 2) |
22 |
|
23 |
###################################################################### |
24 |
#ccfpub=~/ccf_repository |
25 |
#ccfdev=~/ccf_repository/devel |
26 |
#ccftrk=~/ccf_repository/releasetrack |
27 |
##################################################################### |
28 |
|
29 |
ccfpub=/ccf/pub |
30 |
ccfdev=/ccf/priv/dt |
31 |
ccftrk=/ccf/priv/rt |
32 |
|
33 |
|
34 |
tag=`date -u '+%Y%m%dT%H%M%S'` |
35 |
|
36 |
pubcif=~/cifs/pubccf_$tag.cif |
37 |
devcif=~/cifs/devccf_$tag.cif |
38 |
|
39 |
lpubcif=~/cifs/pubccf.cif |
40 |
ldevcif=~/cifs/devccf.cif |
41 |
|
42 |
calindex=`find_calindex $ccfpub` |
43 |
if [ -r $calindex ] ; then |
44 |
cifbuild --calindexset="$pubcif" --withmasterindexset=yes \ |
45 |
--masterindexset=$calindex --withobservationdate=yes |
46 |
else |
47 |
echo I cannot find a calindex file. Doing it the hard way. |
48 |
cifbuild --calindexset="$pubcif" --withccfpath=yes --ccfpath=$ccfpub \ |
49 |
--withobservationdate=yes |
50 |
fi |
51 |
|
52 |
cifbuild --calindexset="$devcif" --withccfpath=yes --ccfpath=$ccfdev:$ccftrk:$ccfpub \ |
53 |
--withobservationdate=yes |
54 |
|
55 |
rm -f $lpubcif $ldevcif |
56 |
|
57 |
ln -s $pubcif $lpubcif |
58 |
ln -s $devcif $ldevcif |