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