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