1 |
#! /usr/local/bin/bash |
#! /usr/local/bin/bash |
2 |
# |
# |
3 |
# $Id: buildagain,v 1.7 2005/11/11 15:43:38 ccflib Exp $ |
# $Id: buildagain,v 1.9 2005/11/11 16:07:24 ccflib Exp $ |
4 |
# |
# |
5 |
# + Build again a specific set of CCF packages |
# + Build again a specific set of CCF packages |
6 |
|
# + Moves the resulting CCF to final destination |
7 |
|
# (makes in part the same that acceptbuild) |
8 |
# |
# |
9 |
# Exit code: |
# Exit code: |
10 |
# + -1 (255): nothing to build |
# + -1 (255): nothing to build |
84 |
for p in $plist; do |
for p in $plist; do |
85 |
echo "making package $p" |
echo "making package $p" |
86 |
thisp=`basename $p '.tgz' | sed -e 's/-[0-9]\{1,\}\.[0-9]\{1,\}$//'` |
thisp=`basename $p '.tgz' | sed -e 's/-[0-9]\{1,\}\.[0-9]\{1,\}$//'` |
87 |
# buildpkg $thisp && (echo ok) || (echo FAILED ; cat $builddir/build.log) |
buildpkg $thisp && (echo ok) || (echo FAILED ; cat $builddir/build.log) |
88 |
done |
done |
89 |
|
|
90 |
|
# Now moves resulting CCF to final destinations |
91 |
|
|
92 |
|
cd $builddir || exit 1 |
93 |
|
|
94 |
|
flist=`find . -name '*.CCF'` |
95 |
|
|
96 |
|
if [ -z "$flist" ] ; then |
97 |
|
exit 0 |
98 |
|
fi |
99 |
|
|
100 |
|
for f in $flist ; do |
101 |
|
b=`basename $f` |
102 |
|
echo Considering $b ... |
103 |
|
if [ -e $ccfdir/$b -o -e $ccfrel/$b -o -e $scisimdir/$b ] ; then |
104 |
|
echo " it already exists. REJECTED." |
105 |
|
else |
106 |
|
if [ -e $ccfdeveldir/$b ] ; then |
107 |
|
echo " it already exists in the development area and it will be overwritten." |
108 |
|
fi |
109 |
|
ccfextseq --sets=$f |
110 |
|
if [ $? -ne 0 ] ; then |
111 |
|
echo " validation stage failed. REJECTED." |
112 |
|
else |
113 |
|
cp $f $ccfdeveldir || exit 1 |
114 |
|
echo " accepted into $ccfdeveldir." |
115 |
|
fi |
116 |
|
fi |
117 |
|
done |