1 |
ccflib |
1.7 |
#! /bin/bash |
2 |
ccflib |
1.1 |
# |
3 |
ccflib |
1.7 |
# $Id: acceptbuild,v 1.6 2011/01/10 13:17:31 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 |
|
|
PATH=$HOME/bin:$PATH |
23 |
|
|
export PATH |
24 |
|
|
|
25 |
|
|
me=`basename $0` |
26 |
|
|
##echo $me running on `date` |
27 |
|
|
|
28 |
|
|
|
29 |
|
|
builddir=$HOME/builds/tmp |
30 |
|
|
cd $builddir || exit 1 |
31 |
|
|
|
32 |
|
|
flist=`find . -name '*.CCF'` |
33 |
|
|
|
34 |
|
|
if [ -z "$flist" ] ; then |
35 |
|
|
## echo No new CCF file found. |
36 |
|
|
exit 0 |
37 |
|
|
fi |
38 |
|
|
|
39 |
|
|
saslatest |
40 |
|
|
|
41 |
ccflib |
1.3 |
new= |
42 |
|
|
|
43 |
ccflib |
1.1 |
for f in $flist ; do |
44 |
|
|
b=`basename $f` |
45 |
ccflib |
1.3 |
echo Considering $b ... |
46 |
ccflib |
1.2 |
if [ -e $ccfdir/$b -o -e $ccfrel/$b -o -e $scisimdir/$b ] ; then |
47 |
ccflib |
1.1 |
echo " it already exists. REJECTED." |
48 |
|
|
else |
49 |
|
|
if [ -e $ccfdeveldir/$b ] ; then |
50 |
|
|
echo " it already exists in the development area and it will be overwritten." |
51 |
|
|
fi |
52 |
|
|
ccfextseq --sets=$f |
53 |
|
|
if [ $? -ne 0 ] ; then |
54 |
|
|
echo " validation stage failed. REJECTED." |
55 |
|
|
else |
56 |
ccflib |
1.2 |
cp $f $ccfdeveldir || exit 1 |
57 |
ccflib |
1.1 |
echo " accepted into $ccfdeveldir." |
58 |
ccflib |
1.3 |
new="$new $b" |
59 |
ccflib |
1.1 |
fi |
60 |
|
|
fi |
61 |
|
|
done |
62 |
ccflib |
1.3 |
|
63 |
ccflib |
1.4 |
# notify of the change in the development track |
64 |
ccflib |
1.5 |
###if [ ! -z "$new" ] ; then |
65 |
|
|
### ccfnotify -t development $new |
66 |
|
|
###fi |