- Timestamp:
- 02/03/06 16:42:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries
r7471 r7476 46 46 table=SequenceBuildStatus 47 47 column=fSequenceEntriesBuilt 48 date=NULL49 datetime=`date +%F-%H-%M-%S`50 year=`date +%Y`51 48 52 49 todofile=$listpath/ToDo-$table-$column.txt 53 getstatuslogpath=$logpath/getstatus/$program/$year 54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 50 lockfile=$lockpath/lock-$program.txt 55 51 56 52 scriptlogpath=$logpath/run/$program/`date +%Y/%m` … … 60 56 date >> $scriptlog 2>&1 61 57 62 makedir $getstatuslogpath >> $scriptlog 2>&163 64 58 # check if script is already running 65 date > $lock path/lock-$program.txt>> $scriptlog 2>&159 date > $lockfile >> $scriptlog 2>&1 66 60 checklock0=$? 67 61 case $checklock0 in … … 75 69 76 70 # 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 71 getdolist >> $scriptlog 2>&1 88 72 89 73 # retrieve dates from todofile … … 92 76 then 93 77 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 98 79 fi 99 80 … … 107 88 buildsequentriespath=$logpath/$program/$year2 108 89 makedir $buildsequentriespath >> $scriptlog 2>&1 90 buildsequenceentrieslog=$buildsequentriespath/buildsequenceentries-$date.log 109 91 110 92 echo "run $program..." >> $scriptlog 2>&1 111 93 setstatus "start" >> $scriptlog 2>&1 112 94 113 check1=`root -q -b $macrospath/buildsequenceentries.C+\("\"$date\""\,"\"$datapath\""\,"\"$sequpath\""\,kFALSE\) | tee $buildsequentries path/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)//'` 114 96 115 97 case $check1 in … … 125 107 done 126 108 127 rm -v $todofile >> $scriptlog 2>&1 128 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 109 finish >> $scriptlog 2>&1 129 110 130 set +C131 132 date >> $scriptlog 2>&1133
Note:
See TracChangeset
for help on using the changeset viewer.