/[CCFs]/bin/updatemif
ViewVC logotype

Annotation of /bin/updatemif

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Tue Mar 19 15:05:10 2002 UTC (22 years, 8 months ago) by ccflib
Branch: MAIN
Changes since 1.1: +19 -32 lines
*** empty log message ***

1 ccflib 1.1 #! /bin/bash
2     #
3     # Giuseppe Vacanti (cosine) September 2000
4     #
5 ccflib 1.2 set -e
6 ccflib 1.1 . $HOME/bin/ccflib.cfg
7    
8 ccflib 1.2 saslatest > /dev/null
9 ccflib 1.1
10 ccflib 1.2 list=`ls $ccfrepository/*CALINDEX*`
11     if [ -z "$list" ] ; then
12     next=1
13 ccflib 1.1 else
14 ccflib 1.2 n=`for f in $ccfrepository/*CALINDEX* ; do
15     basename $f | cut -d_ -f 3 | cut -d. -f 1
16     done | sort -n -r | head -1 | sed -e 's/^0\{1,3\}//g'`
17     next=$[n + 1]
18 ccflib 1.1 fi
19 ccflib 1.2
20     # format with leading zeroes
21 ccflib 1.1 next=`printf "%4.4d" $next`
22    
23     # remove old CALINDEX entries not to clog the system
24     mv $ccfrepository/*CALINDEX* $ccfrepository/calindex
25    
26     export SAS_CCFPATH
27     SAS_CCFPATH=$ccfrepository
28 ccflib 1.2 cd $ccfrepository
29 ccflib 1.1
30 ccflib 1.2 mif=XMM_CALINDEX_$next.CCF
31 ccflib 1.1
32 ccflib 1.2 echo New MIF: $mif
33 ccflib 1.1
34 ccflib 1.2 # build a new one
35     cifbuild --fullpath=no --masterindex=yes --calindexset=$mif
36 ccflib 1.1
37 ccflib 1.2 dssetattr --to=${mif}%ISSUE --type=int --value=$next
38     dssetattr --to=${mif}%FILENAME --type=string --value=$mif
39     ccfextseq --sets=$mif
40 ccflib 1.1

  ViewVC Help
Powered by ViewVC 1.1.27