1 |
ccflib |
1.1 |
#! /usr/local/bin/bash |
2 |
|
|
# |
3 |
|
|
# Giuseppe Vacanti, January 2000 |
4 |
|
|
# |
5 |
ccflib |
1.5 |
# $Id$ |
6 |
ccflib |
1.1 |
|
7 |
ccflib |
1.3 |
#notify () { |
8 |
|
|
# if [ $# -ne 1 ] ; then |
9 |
|
|
# echo notify error |
10 |
|
|
# exit 1 |
11 |
|
|
# fi |
12 |
|
|
# ccfc=$1 |
13 |
|
|
# /usr/lib/sendmail -t << EOF |
14 |
|
|
#From: ccflib@xmm.vilspa.esa.es |
15 |
|
|
#To: xmm-it@xmm.vilspa.esa.es, sas-devel@xmm.vilspa.esa.es |
16 |
|
|
#Subject: New CCF constituent (development): $ccfc |
17 |
|
|
# |
18 |
|
|
#EOF |
19 |
|
|
#} |
20 |
|
|
|
21 |
|
|
|
22 |
ccflib |
1.1 |
. $HOME/bin/ccflib.cfg |
23 |
|
|
|
24 |
|
|
PATH=$HOME/bin:$PATH |
25 |
|
|
export PATH |
26 |
|
|
|
27 |
|
|
me=`basename $0` |
28 |
|
|
##echo $me running on `date` |
29 |
|
|
|
30 |
|
|
|
31 |
|
|
builddir=$HOME/builds/tmp |
32 |
|
|
cd $builddir || exit 1 |
33 |
|
|
|
34 |
|
|
flist=`find . -name '*.CCF'` |
35 |
|
|
|
36 |
|
|
if [ -z "$flist" ] ; then |
37 |
|
|
## echo No new CCF file found. |
38 |
|
|
exit 0 |
39 |
|
|
fi |
40 |
|
|
|
41 |
|
|
saslatest |
42 |
|
|
|
43 |
ccflib |
1.3 |
new= |
44 |
|
|
|
45 |
ccflib |
1.1 |
for f in $flist ; do |
46 |
|
|
b=`basename $f` |
47 |
ccflib |
1.3 |
echo Considering $b ... |
48 |
ccflib |
1.2 |
if [ -e $ccfdir/$b -o -e $ccfrel/$b -o -e $scisimdir/$b ] ; then |
49 |
ccflib |
1.1 |
echo " it already exists. REJECTED." |
50 |
|
|
else |
51 |
|
|
if [ -e $ccfdeveldir/$b ] ; then |
52 |
|
|
echo " it already exists in the development area and it will be overwritten." |
53 |
|
|
fi |
54 |
|
|
ccfextseq --sets=$f |
55 |
|
|
if [ $? -ne 0 ] ; then |
56 |
|
|
echo " validation stage failed. REJECTED." |
57 |
|
|
else |
58 |
ccflib |
1.2 |
cp $f $ccfdeveldir || exit 1 |
59 |
ccflib |
1.1 |
echo " accepted into $ccfdeveldir." |
60 |
ccflib |
1.3 |
new="$new $b" |
61 |
ccflib |
1.1 |
fi |
62 |
|
|
fi |
63 |
|
|
done |
64 |
ccflib |
1.3 |
|
65 |
ccflib |
1.4 |
# notify of the change in the development track |
66 |
ccflib |
1.5 |
###if [ ! -z "$new" ] ; then |
67 |
|
|
### ccfnotify -t development $new |
68 |
|
|
###fi |