Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:33

0001 #!/bin/sh
0002 
0003 function usage () {
0004     
0005     echo -e "\n[usage] `basename $0` [options]"
0006     echo -e " -CondDb=<devdb10>, <orcon> (no default )"
0007     echo -e " -auth=<coral_auth_path> (default is ${CORAL_AUTH_PATH}/authentication.xml )"
0008 
0009     
0010     exit
0011 }
0012 
0013 function getParameter(){
0014     what=$1
0015     eval $what=\$$#
0016     shift
0017     where=$@
0018     if [ `echo $where | grep -c "\-$what="` = 1 ]; then
0019         eval $what=`echo $where | awk -F"${what}=" '{print $2}' | awk '{print $1}'`
0020     elif [ `echo $where | grep -c "\-$what "` = 1 ]; then
0021         eval $what=1
0022     fi
0023 }
0024 
0025 
0026 #################
0027 ## MAIN
0028 #################
0029 
0030 export CORAL_AUTH_PATH=/afs/cern.ch/cms/DB/conddb
0031 
0032 [ `echo $@ | grep -c "\-help"` = 1 ] && usage;
0033 
0034 getParameter CondDb    $@ ""
0035 getParameter auth      $@ ${CORAL_AUTH_PATH}/authentication.xml
0036 
0037 if [ "$CondDb" != "devdb10" ] && [ "$CondDb" != "orcon" ];
0038     then
0039     echo -e "\nERROR: wrong options"
0040     usage
0041 fi
0042 eval `scramv1 runtime -sh`
0043 export TNS_ADMIN=/afs/cern.ch/project/oracle/admin
0044 
0045 echo cmscond_bootstrap_detector.pl --offline_connect oracle://$CondDb/CMS_COND_STRIP --auth $auth STRIP
0046 
0047 cmscond_bootstrap_detector.pl --offline_connect oracle://$CondDb/CMS_COND_STRIP --auth $auth STRIP
0048