Changeset 7465 for trunk/MagicSoft/Mars/datacenter/scripts/runstar
- Timestamp:
- 01/30/06 17:13:07 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/runstar
r7460 r7465 38 38 39 39 user=`whoami` 40 program=star 40 41 source /home/$user/Mars/datacenter/scripts/sourcefile 41 42 … … 50 51 51 52 todofile=$listpath/ToDo-$table-$column 52 getstatuslogpath=$logpath/getstatus/ star/$year53 getstatuslog=$getstatuslogpath/getstatus- star-$datetime.log53 getstatuslogpath=$logpath/getstatus/$program/$year 54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 54 55 55 scriptlogpath=$logpath/run/ star/`date +%Y/%m/%d`56 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` 56 57 makedir $scriptlogpath 57 scriptlog=$scriptlogpath/run star-$datetime.log58 scriptlog=$scriptlogpath/run$program-$datetime.log 58 59 59 60 date >> $scriptlog 2>&1 … … 64 65 65 66 # check if getting of list is already running 66 date > $lockpath/lock-getting- star-list.txt >> $scriptlog 2>&167 date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 67 68 checklock0=$? 68 69 case $checklock0 in 69 70 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 70 71 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 71 echo "-> getting list for staris running -> exit" >> $scriptlog 2>&172 echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1 72 73 date >> $scriptlog 2>&1 73 74 exit;; … … 86 87 87 88 case $check0 in 88 1) echo "check0=$check0 -> everything ok -> run star" >> $scriptlog 2>&1;;89 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 89 90 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 90 91 esac 91 92 fi 92 93 93 rm -v $lockpath/lock-getting- star-list.txt >> $scriptlog 2>&194 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 94 95 95 96 # choosing todo file … … 124 125 esac 125 126 126 127 127 # retrieve sequence from todo file 128 128 sequences=(`cat $todofile`) … … 142 142 no=`printf %08d $sequence | cut -c 0-4` 143 143 no2=`printf %08d $sequence` 144 outpath="$datapath/ star/$no/$no2"145 inpath=`echo $outpath | sed -e 's/ star/callisto/'`144 outpath="$datapath/$program/$no/$no2" 145 inpath=`echo $outpath | sed -e 's/$program/callisto/'` 146 146 echo "inpath: "$inpath >> $scriptlog 2>&1 147 147 echo "outpath: "$outpath >> $scriptlog 2>&1 … … 151 151 echo "sequfile: "$sequfile >> $scriptlog 2>&1 152 152 153 echo "run star..." >> $scriptlog 2>&1154 ./star -b -q -v4 -f --log=$outpath/ star$no2.log --html=$outpath/star$no2.html --ind=$inpath --out=$outpath $sequfile 2>> $scriptlog> /dev/null153 echo "run $program..." >> $scriptlog 2>&1 154 ./star -b -q -v4 -f --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --ind=$inpath --out=$outpath $sequfile 2>> $scriptlog> /dev/null 155 155 check1=$? 156 156 157 157 case $check1 in 158 158 0) echo "check1=$check1 -> everything ok " >> $scriptlog 2>&1 159 echo "-> inserting the status for star for sequence $sequence into the db" >> $scriptlog 2>&1 160 setstatuslogpath=$logpath/setstatus/star/$no 161 makedir $setstatuslogpath >> $scriptlog 2>&1 162 setstatuslog=$setstatuslogpath/setstatus-star-$no2.log 163 164 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 165 case $check4 in 166 1) echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;; 167 *) echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;; 168 esac 159 echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1 160 statustime="Now()" 161 failed="NULL" 162 starttime="NULL" 163 failedtime="NULL" 164 var1=$no 165 var2=$no2 166 setstatus 169 167 ;; 170 168 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
Note:
See TracChangeset
for help on using the changeset viewer.