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