Ignore:
Timestamp:
02/03/06 16:42:00 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries

    r7471 r7476  
    4646table=SequenceBuildStatus
    4747column=fSequenceEntriesBuilt
    48 date=NULL
    49 datetime=`date +%F-%H-%M-%S`
    50 year=`date +%Y`
    5148
    5249todofile=$listpath/ToDo-$table-$column.txt
    53 getstatuslogpath=$logpath/getstatus/$program/$year
    54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     50lockfile=$lockpath/lock-$program.txt
    5551
    5652scriptlogpath=$logpath/run/$program/`date +%Y/%m`
     
    6056date >> $scriptlog 2>&1
    6157
    62 makedir $getstatuslogpath >> $scriptlog 2>&1
    63 
    6458# check if script is already running
    65 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1
     59date > $lockfile >> $scriptlog 2>&1
    6660checklock0=$?
    6761case $checklock0 in
     
    7569
    7670# get todo list
    77 echo "getting todo list..." >> $scriptlog 2>&1
    78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatus.log | grep int | sed -e 's/(int)//'`
    79 
    80 case $check0 in
    81    1)   echo "check0=$check0 -> everything ok, got todo list -> build sequence entries" >> $scriptlog 2>&1;;
    82    *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1
    83         rm -v $todofile >> $scriptlog 2>&1
    84         rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    85         date  >> $scriptlog 2>&1
    86         exit;;
    87 esac
     71getdolist  >> $scriptlog 2>&1
    8872
    8973# retrieve dates from todofile
     
    9276then
    9377   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    94    rm -v $todofile >> $scriptlog 2>&1
    95    rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    96    date  >> $scriptlog 2>&1
    97    exit
     78   finish >> $scriptlog 2>&1
    9879fi
    9980
     
    10788   buildsequentriespath=$logpath/$program/$year2
    10889   makedir  $buildsequentriespath >> $scriptlog 2>&1
     90   buildsequenceentrieslog=$buildsequentriespath/buildsequenceentries-$date.log
    10991
    11092   echo "run $program..." >> $scriptlog 2>&1
    11193   setstatus "start" >> $scriptlog 2>&1
    11294
    113    check1=`root -q -b $macrospath/buildsequenceentries.C+\("\"$date\""\,"\"$datapath\""\,"\"$sequpath\""\,kFALSE\) | tee $buildsequentriespath/buildsequenceentries-$date.log | grep int | sed -e 's/(int)//'`
     95   check1=`root -q -b $macrospath/buildsequenceentries.C+\("\"$date\""\,"\"$datapath\""\,"\"$sequpath\""\,kFALSE\) | tee $buildsequentrieslog | grep int | sed -e 's/(int)//'`
    11496
    11597   case $check1 in
     
    125107done
    126108
    127 rm -v $todofile >> $scriptlog 2>&1
    128 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
     109finish >> $scriptlog 2>&1
    129110
    130 set +C
    131 
    132 date  >> $scriptlog 2>&1
    133 
Note: See TracChangeset for help on using the changeset viewer.