Changeset 8482 for trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
- Timestamp:
- 05/09/07 17:05:15 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
r8454 r8482 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 622 # Copyright: MAGIC Software Development, 2000-2007 23 23 # 24 24 # … … 51 51 sequence=$process 52 52 53 # lock sequ 53 # lock sequ for cal 54 54 lockfile=$lockpath/lock-$table-$column-$sequence.txt 55 55 checklock >> $scriptlog 2>&1 … … 62 62 no=`printf %08d $sequence | cut -c 0-4` 63 63 no2=`printf %08d $sequence` 64 var1=$no65 var2=$no266 64 outpath="$datapath/$program/$no/$no2" 67 65 makedir $outpath >> $scriptlog 2>&1 … … 80 78 if [ $sequence -gt 200000 ] 81 79 then 82 80 ln -vs $callistorcmux $outpath/callisto.rc >> $scriptlog 2>&1 83 81 else 84 82 ln -vs $callistorcnew $outpath/callisto.rc >> $scriptlog 2>&1 85 83 fi 86 84 callistorcseq=$outpath/callisto.rc 87 85 fi 88 86 87 # lock sequ for zipping 88 lockfile=$lockpath/calzip$sequence.txt 89 # if lockfile is already existing, 1 is returned 90 if ! checklock return 1 >> $scriptlog 2>&1 91 then 92 # reset lockfile name 93 lockfile=$lockpath/lock-$table-$column-$sequence.txt 94 finish >> $scriptlog 2>&1 95 fi 96 97 primvar=$no2 89 98 setstatus "start" >> $scriptlog 2>&1 90 99 … … 92 101 ./callisto -b -q -v4 -f --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --out=$outpath --config=$callistorcseq $sequfile 2>> $scriptlog > /dev/null 93 102 check1=$? 103 104 # remove lockfile for zip and reset lockfile name 105 rm -v $lockfile >> $scriptlog 2>&1 106 lockfile=$lockpath/lock-$table-$column-$sequence.txt 94 107 95 108 case $check1 in … … 117 130 # find cc and caco file 118 131 # if file is missing continue with next sequence 132 date=`date --date \`basename $calfile | cut -d_ -f1 +%Y/%m/%d\`` 133 ccpath=$subsystempath/cc/$date 134 cacopath=$subsystempath/caco/$date 119 135 runno=`echo $calfile | cut -d_ -f2 | sed -e 's/^0//' | sed -e 's/^0//' | sed -e 's/^0//' ` 120 ccfile=`find /magic/subsystemdata/cc/ -name [2][0][0-2][0-9][0,1][0-9][0-3][0-9]_*${runno}_[P,D,C,S]_*_S.rep -and ! -name [2][0][0-2][0-9][0,1][0-9][0-3][0-9]_*[1-9]${runno}_[P,D,C,S]_*_S.rep`136 ccfile=`find $ccpath -name 20[0-2][0-9][01][0-9][0-3][0-9]_*${runno}_[PDCS]_*_S.rep` 121 137 source=`echo $ccfile | cut -d_ -f4` 122 cacofile=`find /magic/subsystemdata/caco/ -name dc_[2][0][0-2][0-9]_[0,1][0-9]_[0-3][0-9]_*${runno}_${source}.txt -and ! -name dc_[2][0][0-2][0-9]_[0,1][0-9]_[0-3][0-9]_*[1-9]${runno}_${source}.txt` 123 # cacofile=`find /magic/subsystemdata/caco/ -name dc_[2][0][0-2][0-9]_[0,1][0-9]_[0-3][0-9]_*${runno}_*.txt` 138 cacofile=`find /magic/subsystemdata/caco/$date -name dc_20[0-2][0-9]_[01][0-9]_[0-3][0-9]_*${runno}_${source}.txt` 124 139 if [ "$ccfile" = "" ] 125 140 then … … 138 153 do 139 154 newrun=`echo $runno - $i | bc` 140 path=`dirname $ccfile` 141 path=`echo $path | sed -e 's/cc/caco/'` 142 echo "path: "$path >> $scriptlog 2>&1 143 cacofile=`find $path -name *$newrun*` 155 cacofile=`find $cacopath -name *$newrun*` 144 156 if [ "$cacofile" = "" ] 145 157 then 146 158 if [ $i -eq 9 ] 147 159 then 148 echo "no cacofile found " >> $scriptlog 2>&1160 echo "no cacofile found for runno $newrun in $cacopath" >> $scriptlog 2>&1 149 161 printprocesslog "ERROR cacofile $cacofile not found for $calfile" 150 162 com=$Fnocacofile … … 164 176 check2=$? 165 177 case $check2 in 166 167 168 169 170 171 172 173 174 178 0) echo " check2=$check2 -> everything ok, merppccupdate worked -> continue" >> $scriptlog 2>&1 179 printprocesslog "INFO merppupdated $calfile sucessfully with $ccfile" 180 ;; 181 *) echo " check2=$check2 -> ERROR -> merppccupdate failed" >> $scriptlog 2>&1 182 printprocesslog "ERROR merppccupdate with file $ccfile failed for $calfile" 183 com=$Fmerppcc 184 comadd=$runno 185 check=$check2 186 break ;; 175 187 esac 176 188 echo "./merpp -u --log=$merpplogpath/merppcacoupdate$runno.log --html=$merpplogpath/merppcacoupdate$runno.html --auto-time $cacofile $calfile 2>> $scriptlog> /dev/null" >> $scriptlog 2>&1 … … 178 190 check3=$? 179 191 case $check3 in 180 181 182 183 184 185 186 187 188 192 0) echo " check3=$check3 -> everything ok, merppcacoupdate worked -> continue" >> $scriptlog 2>&1 193 printprocesslog "INFO merppupdated $calfile sucessfully with $cacofile" 194 ;; 195 *) echo " check3=$check3 -> ERROR -> merppcacoupdate failed" >> $scriptlog 2>&1 196 printprocesslog "ERROR merppcacoupdate with file $cacofile failed for $calfile" 197 com=$Fmerppcaco 198 comadd=$runno 199 check=$check3 200 break ;; 189 201 esac 190 202 done
Note:
See TracChangeset
for help on using the changeset viewer.