1 |
#! /bin/bash |
2 |
# |
3 |
# $Id: acceptbuild,v 1.7 2014/12/02 15:55:21 ccflib Exp $ |
4 |
|
5 |
#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 |
#From: ccflib@xmm.esac.esa.int |
13 |
#To: xmm-it@xmm..esac.esa.int, sas-devel@xmm.esac.esa.int |
14 |
#Subject: New CCF constituent (development): $ccfc |
15 |
# |
16 |
#EOF |
17 |
#} |
18 |
|
19 |
|
20 |
. $HOME/bin/ccflib.cfg |
21 |
|
22 |
export PATH=${CCFLIB_HOME}/bin:$PATH |
23 |
|
24 |
me=`basename $0` |
25 |
##echo $me running on `date` |
26 |
|
27 |
|
28 |
builddir=${CCFLIB_HOME}/builds/tmp |
29 |
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 |
new= |
41 |
|
42 |
for f in $flist ; do |
43 |
b=`basename $f` |
44 |
echo Considering $b ... |
45 |
if [ -e $ccfdir/$b -o -e $ccfrel/$b -o -e $scisimdir/$b ] ; then |
46 |
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 |
cp $f $ccfdeveldir || exit 1 |
56 |
echo " accepted into $ccfdeveldir." |
57 |
new="$new $b" |
58 |
fi |
59 |
fi |
60 |
done |
61 |
|
62 |
# notify of the change in the development track |
63 |
###if [ ! -z "$new" ] ; then |
64 |
### ccfnotify -t development $new |
65 |
###fi |