Commit 8a6254c8 authored by Stefano Belforte's avatar Stefano Belforte
Browse files

test new CE-cms-basic

parent 3746fac2
......@@ -191,11 +191,12 @@ fi
echo "<h2>Compare local configuration file and TFC with CVS</h2>"
siteName=`grep "site name" $ConfigFile | grep -v "subsite name" | cut -d'"' -f2`
let seconds=`date %s`-`stat -c%Y $ConfigFile`
echo "<pre>"
let seconds=`date +%s`-`stat -c%Y $ConfigFile`
let localConfigFileAgeInHours=$seconds/3600
echo local configuration file ${ConfigFile} is ${localConfigFileAgeInHours} hours old
echo "siteName =" $siteName
echo siteName = $siteName
subSiteName=`grep "subsite name" $ConfigFile | cut -d'"' -f2`
_subSiteName=
if [ "x$subSiteName" == "x" ] ; then
......@@ -220,13 +221,14 @@ echo "rc = $rc <br>"
# echo "<br>INFO: failed to access CVS Web repository<bre>"
#else
echo "</pre>"
if [ $rc == $SAME_OK ] || [ $rc == $SAME_INFO ] ; then
diff -q -w -B $ConfigFile $ConfigFileFromCVS
if [ $? == 1 ] ; then asCvs=0; fi
echo "<br>"
if [ $asCvs == 0 ] ; then
if [ $localConfigFileAgeInHours -gt 72 ] then
if [ $localConfigFileAgeInHours -gt 72 ] ; then
error=1
echo "<strong>ERROR: local site configuration file differ from CVS</strong>"
else
......@@ -256,7 +258,8 @@ echo "<br>"
TFCfileName=`echo $TFCfile | awk -F'/' '{print $NF}'`
let seconds=`date %s`-`stat -c%Y $ConfigFile`
echo "<pre>"
let seconds=`date +%s`-`stat -c%Y $ConfigFile`
let localTFCfileAgeInHours=$seconds/3600
echo local configuration file ${TFCfile} is ${localTFCfileAgeInHours} hours old
......@@ -265,10 +268,9 @@ asCvs=1
cvsUrl="\"http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/COMP/SITECONF/${siteName}/PhEDEx/${TFCfileName}?rev=HEAD&content-type=text/plain\""
echo "<pre>"
echo TFCfileName: $TFCfileName
echo cvsUrl $cvsUrl
echo"</pre>"
echo "</pre>"
TfcFileFromCVS=`mktemp /tmp/storage-from-CVS.xml.XXXX`
echo "Fetch CVS copy of TFC from $cvsUrl<br>"
......@@ -281,12 +283,15 @@ echo "rc = $rc <br>"
#if [ $rc == $SAME_WARNING ] || [ $rc == $SAME_ERROR ] ; then
# echo "<br>INFO: failed to access CVS Web repository<bre>"
#else
echo "</pre>"
if [ $rc == $SAME_OK ] || [ $rc == $SAME_INFO ] ; then
diff -q -w -B $TFCfile $TfcFileFromCVS
if [ $? == 1 ] ; then asCvs=0; fi
echo "<br>"
if [ $asCvs == 0 ] ; then
if [ $localTFCfileAgeInHours -gt 72 ] then
if [ $localTFCfileAgeInHours -gt 72 ] ; then
error=1
echo "<strong>ERROR: local Trivial Catalog File file differ from CVS</strong>"
else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment