Changeset 7233 for trunk/MagicSoft/Mars
- Timestamp:
- 07/30/05 01:15:40 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7232 r7233 20 20 21 21 -*-*- END OF LINE -*-*- 22 23 2005/07/30 Daniela Dorner 24 25 * datacenter/scripts/sourcefile: 26 - added function to make a directory 27 28 * datacenter/scripts/buildsequenceentries, checkstardone, copyscript, 29 checkfilesforsequenceavail, correcttime, doexclusions, filesondisk, 30 fillcallisto, fillstar, insertdatasets, runcallisto, runganymed, 31 runstar, writesequencefiles: 32 - replaced making of directories by the function 33 34 22 35 23 36 2005/07/29 Daniela Dorner -
trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries
r7232 r7233 45 45 46 46 scriptlogpath=$logpath/run/buildsequenceentries/`date +%Y/%m` 47 if [ ! -d $scriptlogpath ] 48 then 49 mkdir -pv $scriptlogpath 50 if [ ! -d $scriptlogpath ] 51 then 52 echo "could not make scriptlogpath "$scriptlogpath 53 exit 54 fi 55 fi 56 47 makedir $scriptlogpath 57 48 scriptlog=$scriptlogpath/buildsequenceentries-$datetime.log 58 49 59 50 date >> $scriptlog 2>&1 60 51 61 if [ ! -d $getstatuslogpath ] 62 then 63 mkdir -pv $getstatuslogpath >> $scriptlog 2>&1 64 if [ ! -d $getstatuslogpath ] 65 then 66 echo "could not make getstatuslogpath "$getstatuslogpath >> $scriptlog 2>&1 67 date >> $scriptlog 2>&1 68 exit 69 fi 70 fi 52 makedir $getstatuslogpath >> $scriptlog 2>&1 71 53 72 54 date > $lockpath/lock-buildsequenceentries.txt >> $scriptlog 2>&1 … … 108 90 year2=`echo $date | cut -c 1-4` 109 91 buildsequentriespath=$logpath/buildsequenceentries/$year2 110 if [ ! -d $buildsequentriespath ] 111 then 112 mkdir -pv $buildsequentriespath >> $scriptlog 2>&1 113 if [ ! -d $buildsequentriespath ] 114 then 115 echo "could not make buildsequentriespath "$buildsequentriespath >> $scriptlog 2>&1 116 continue 117 fi 118 fi 92 makedir $buildsequentriespath >> $scriptlog 2>&1 93 119 94 check1=`root -q -b $macrospath/buildsequenceentries.C+\("\"$date\""\,"\"$datapath\""\,"\"$sequpath\""\,kFALSE\) | tee $buildsequentriespath/buildsequenceentries-$date.log | grep int | sed -e 's/(int)//'` 120 95 … … 122 97 1) echo "check1=$check1 -> everthing ok -> setting status..." >> $scriptlog 2>&1 123 98 setstatuslogpath=$logpath/setstatus/buildsequenceentries/$year2 124 if [ ! -d $setstatuslogpath ] 125 then 126 mkdir -pv $setstatuslogpath >> $scriptlog 2>&1 127 if [ ! -d $setstatuslogpath ] 128 then 129 echo "could not make setstatuslogpath "$setstatuslogpath >> $scriptlog 2>&1 130 continue 131 fi 132 fi 99 makedir $setstatuslogpath >> $scriptlog 2>&1 100 133 101 check2=`root -q -b $macrospath/setstatus.C+\("\"$date\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslogpath/setstatus-buildsequenceentries-$date.log | grep int | sed -e 's/(int)//'` 134 102 case $check2 in -
trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail
r7232 r7233 41 41 42 42 scriptlogpath=$logpath/run/checkfilesavail/`date +%Y/%m/%d` 43 if [ ! -d $scriptlogpath ] 44 then 45 mkdir -pv $scriptlogpath 46 if [ ! -d $scriptlogpath ] 47 then 48 echo "could not make scriptlogpath "$scriptlogpath 49 exit 50 fi 51 fi 43 makedir $scriptlogpath 52 44 53 45 scriptlog=$scriptlogpath/checkfilesforsequenceavail-$datetime.log … … 55 47 date >> $scriptlog 2>&1 56 48 57 if [ ! -d $getstatuslogpath ] 58 then 59 mkdir -pv $getstatuslogpath >> $scriptlog 2>&1 60 if [ ! -d $getstatuslogpath ] 61 then 62 echo "could not make getstatuslogpath "$getstatuslogpath >> $scriptlog 2>&1 63 exit 64 fi 65 fi 49 makedir $getstatuslogpath >> $scriptlog 2>&1 66 50 67 51 cd $mars … … 100 84 outpath=$logpath/checkfileavail/$no 101 85 echo "outpath: "$outpath >> $scriptlog 2>&1 102 if [ ! -d $outpath ] 103 then 104 mkdir -pv $outpath >> $scriptlog 2>&1 105 if [ ! -d $outpath ] 106 then 107 echo "could not make outpath $outpath -> continue " >> $scriptlog 2>&1 108 continue 109 fi 110 fi 86 makedir $outpath >> $scriptlog 2>&1 87 111 88 check1=`root -q -b $macrospath/checkfileavail.C+\(\""$sequence\""\) | tee $outpath/checkfileavail-$sequence.log | grep int | sed -e 's/(int)//'` 112 89 … … 114 91 1) echo "check1=$check1 -> everthing ok -> setting status..." >> $scriptlog 2>&1 115 92 setstatuslogpath=$logpath/setstatus/checkfileavail/$no 116 if [ ! -d $setstatuslogpath ] 117 then 118 mkdir -pv $setstatuslogpath >> $scriptlog 2>&1 119 if [ ! -d $setstatuslogpath ] 120 then 121 echo "could not make setstatuslogpath "$setstatuslogpath >> $scriptlog 2>&1 122 continue 123 fi 124 fi 93 makedir $setstatuslogpath >> $scriptlog 2>&1 94 125 95 check2=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslogpath/setstatus-checkfileavail-$sequence.log | grep int | sed -e 's/(int)//'` 126 96 case $check2 in -
trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
r7232 r7233 41 41 42 42 scriptlogpath=$logpath/run/checkstardone/`date +%Y/%m/%d` 43 if [ ! -d $scriptlogpath ] 44 then 45 mkdir -pv $scriptlogpath 46 if [ ! -d $scriptlogpath ] 47 then 48 echo "could not make scriptlogpath "$scriptlogpath 49 exit 50 fi 51 fi 43 makedir $scriptlogpath 52 44 53 45 scriptlog=$scriptlogpath/checkstardone-$datetime.log … … 55 47 date >> $scriptlog 2>&1 56 48 57 if [ ! -d $getstatuslogpath ] 58 then 59 mkdir -pv $getstatuslogpath >> $scriptlog 2>&1 60 if [ ! -d $getstatuslogpath ] 61 then 62 echo "could not make getstatuslogpath "$getstatuslogpath >> $scriptlog 2>&1 63 exit 64 fi 65 fi 49 makedir $getstatuslogpath >> $scriptlog 2>&1 66 50 67 51 cd $mars … … 113 97 outpath=$logpath/checkstardone/$no 114 98 echo "outpath: "$outpath >> $scriptlog 2>&1 115 if [ ! -d $outpath ] 116 then 117 mkdir -pv $outpath >> $scriptlog 2>&1 118 if [ ! -d $outpath ] 119 then 120 echo "could not make outpath $outpath -> continue " >> $scriptlog 2>&1 121 continue 122 fi 123 fi 99 makedir $outpath >> $scriptlog 2>&1 124 100 125 101 for sequence in ${sequences[@]} … … 137 113 138 114 setstatuslogpath=$logpath/setstatus/checkstardone/$no 139 if [ ! -d $setstatuslogpath ] 140 then 141 mkdir -pv $setstatuslogpath >> $scriptlog 2>&1 142 if [ ! -d $setstatuslogpath ] 143 then 144 echo "could not make setstatuslogpath "$setstatuslogpath >> $scriptlog 2>&1 145 continue 146 fi 147 fi 115 makedir $setstatuslogpath >> $scriptlog 2>&1 116 148 117 check2=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslogpath/setstatus-checkstardone-$dataset.log | grep int | sed -e 's/(int)//'` 149 118 case $check2 in -
trunk/MagicSoft/Mars/datacenter/scripts/copyscript
r7213 r7233 70 70 71 71 scriptlogpath=$logpath/run/copyscript/`date +%Y/%m/%d` 72 if [ ! -d $scriptlogpath ] 73 then 74 mkdir -pv $scriptlogpath 75 if [ ! -d $scriptlogpath ] 76 then 77 echo "could not make scriptlogpath "$scriptlogpath 78 exit 79 fi 80 fi 72 makedir $scriptlogpath 81 73 82 74 scriptlog=$scriptlogpath/copyscript-$datetime.log … … 149 141 copylogpath=$logpath/copyscript/$date2 150 142 echo "copylogpath: "$copylogpath >> $scriptlog 2>&1 151 if [ ! -d $copylogpath ] 152 then 153 mkdir -pv $copylogpath >> $scriptlog 2>&1 154 if [ ! -d $copylogpath ] 155 then 156 echo "could not make copylogpath $copylogpath -> continue " >> $scriptlog 2>&1 157 continue 158 fi 159 fi 143 makedir $copylogpath >> $scriptlog 2>&1 160 144 161 145 #loop over all files in the directories for this date … … 172 156 echo "file (new path): "$newfile >> $scriptlog 2>&1 173 157 newpath=`dirname $newfile` 174 # echo "new path: "$newpath175 158 #make sure, that the needed directories are available 176 if [ ! -d $newpath ] 177 then 178 mkdir -pv $newpath >> $scriptlog 2>&1 179 if [ ! -d $newpath ] 180 then 181 echo "could not make path $newpath" >> $scriptlog 2>&1 182 continue 183 fi 184 fi 159 makedir $newpath >> $scriptlog 2>&1 185 160 186 161 #run macros if the file is a *.rbk or a *.run file to -
trunk/MagicSoft/Mars/datacenter/scripts/correcttime
r7232 r7233 38 38 getstatuslogpath=$logpath/getstatus/correct_raw_time/$year 39 39 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log 40 41 if [ ! -d $getstatuslogpath ] 42 then 43 mkdir -pv $getstatuslogpath 44 if [ ! -d $getstatuslogpath ] 45 then 46 echo "could not make getstatuslogpath "$getstatuslogpath 47 exit 48 fi 49 fi 50 40 makedir $getstatuslogpath >> $scriptlog 2>&1 51 41 52 42 if [ -e $listpath/ToDo-$table-$column.txt ] … … 86 76 outpath=`dirname $outfile` 87 77 echo "outpath:"$outpath 88 if [ ! -d $outpath ] 89 then 90 mkdir -pv $outpath 91 if [ ! -d $outpath ] 92 then 93 echo "could not make outpath "$outpath 94 continue 95 fi 96 fi 78 makedir $outpath 79 97 80 timecorrpath=$outpath"/timecorrlogs" 98 81 echo "timecorrpath: "$timecorrpath 99 if [ ! -d $timecorrpath ] 100 then 101 mkdir -pv $timecorrpath 102 if [ ! -d $timecorrpath ] 103 then 104 echo "could not make timecorrpath "$timecorrpath 105 continue 106 fi 107 fi 82 make dir $timecorrpath 108 83 109 84 check1=0 … … 117 92 setstatuspath=$logpath/setstatus/correct_raw_time/$no 118 93 echo "setstatuspath: "$setstatuspath 119 if [ ! -d $setstatuspath ] 120 then 121 mkdir -pv $setstatuspath 122 if [ ! -d $setstatuspath ] 123 then 124 echo "could not make setstatuspath $setstatuspath -> continue " 125 continue 126 fi 127 fi 94 makedir $setstatuspath 95 128 96 check2=`root -q -b $macrospath/setstatus.C+\("\"$run\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuspath/setstatus-correct_raw_time-$run.log | grep int | sed -e 's/(int)//'` 129 97 case $check2 in -
trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
r7232 r7233 45 45 46 46 scriptlogpath=$logpath/run/doexclusions/`date +%Y/%m` 47 if [ ! -d $scriptlogpath ] 48 then 49 mkdir -pv $scriptlogpath 50 if [ ! -d $scriptlogpath ] 51 then 52 echo "could not make scriptlogpath "$scriptlogpath 53 exit 54 fi 55 fi 47 makedir $scriptlogpath 56 48 57 49 scriptlog=$scriptlogpath/doexclusions-$datetime.log … … 59 51 date >> $scriptlog 2>&1 60 52 61 if [ ! -d $getstatuslogpath ] 62 then 63 mkdir -pv $getstatuslogpath >> $scriptlog 2>&1 64 if [ ! -d $getstatuslogpath ] 65 then 66 echo "could not make getstatuslogpath "$getstatuslogpath >> $scriptlog 2>&1 67 date >> $scriptlog 2>&1 68 exit 69 fi 70 fi 53 makedir $getstatuslogpath >> $scriptlog 2>&1 71 54 72 55 date > $lockpath/lock-doexclusions.txt >> $scriptlog 2>&1 … … 108 91 year2=`echo $date | cut -c 1-4` 109 92 doexclusionspath=$logpath/doexclusions/$year2 110 if [ ! -d $doexclusionspath ] 111 then 112 mkdir -pv $doexclusionspath >> $scriptlog 2>&1 113 if [ ! -d $doexclusionspath ] 114 then 115 echo "could not make doexclusionspath "$doexclusionspath >> $scriptlog 2>&1 116 continue 117 fi 118 fi 93 makedir $doexclusionspath >> $scriptlog 2>&1 94 119 95 check1=`root -q -b $macrospath/doexclusions.C+\("\"$date\""\) | tee $doexclusionspath/doexclusions-$date.log | grep int | sed -e 's/(int)//'` 120 96 … … 122 98 1) echo "check1=1 -> everthing ok -> setting status..." 123 99 setstatuslogpath=$logpath/setstatus/doexclusions/$year2 124 if [ ! -d $setstatuslogpath ] 125 then 126 mkdir -pv $setstatuslogpath >> $scriptlog 2>&1 127 if [ ! -d $setstatuslogpath ] 128 then 129 echo "could not make setstatuslogpath "$setstatuslogpath >> $scriptlog 2>&1 130 continue 131 fi 132 fi 100 makedir $setstatuslogpath >> $scriptlog 2>&1 101 133 102 check2=`root -q -b $macrospath/setstatus.C+\("\"$date\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslogpath/setstatus-doexclusions-$date.log | grep int | sed -e 's/(int)//'` 103 134 104 case $check2 in 135 105 1) echo "check2=$check2 -> everthing ok, status has been set";; -
trunk/MagicSoft/Mars/datacenter/scripts/filesondisk
r7232 r7233 35 35 subsystemdir=/magic/subsystemdata 36 36 filesondisklogpath=$logpath/filesondisk/`date +%Y` 37 38 if [ ! -d $filesondisklogpath ] 39 then 40 mkdir -pv $filesondisklogpath 41 if [ ! -d $filesondisklogpath ] 42 then 43 echo "could not make directory "$filesondisklogpath 44 exit 45 fi 46 fi 47 37 makedir $filesondisklogpath 48 38 49 39 -
trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto
r7232 r7233 43 43 44 44 scriptlogpath=$logpath/run/fillcallisto/`date +%Y/%m/%d` 45 if [ ! -d $scriptlogpath ] 46 then 47 mkdir -pv $scriptlogpath 48 if [ ! -d $scriptlogpath ] 49 then 50 echo "could not make scriptlogpath "$scriptlogpath 51 exit 52 fi 53 fi 45 makedir $scriptlogpath 54 46 55 47 scriptlog=$scriptlogpath/runfillcallisto-$datetime.log … … 57 49 date >> $scriptlog 2>&1 58 50 59 60 if [ ! -d $getstatuslogpath ] 61 then 62 mkdir -pv $getstatuslogpath >> $scriptlog 2>&1 63 if [ ! -d $getstatuslogpath ] 64 then 65 echo "could not make getstatuslogpath "$getstatuslogpath >> $scriptlog 2>&1 66 date >> $scriptlog 2>&1 67 exit 68 fi 69 fi 51 makedir $getstatuslogpath >> $scriptlog 2>&1 70 52 71 53 cd $mars … … 112 94 fillcallistologpath=$logpath/fillcallisto/$no 113 95 echo "fillcallistologpath: "$fillcallistologpath >> $scriptlog 2>&1 114 if [ ! -d $fillcallistologpath ] 115 then 116 mkdir -pv $fillcallistologpath >> $scriptlog 2>&1 117 if [ ! -d $fillcallistologpath ] 118 then 119 echo "could not make fillcallistologpath $fillcallistologpath -> continue " >> $scriptlog 2>&1 120 continue 121 fi 122 fi 96 makedir $fillcallistologpath >> $scriptlog 2>&1 123 97 fillcaliblog=$fillcallistologpath/fillcalib-$sequence.log 124 98 fillsignallog=$fillcallistologpath/fillsignal-$sequence.log … … 139 113 echo "-> inserting the status for fillcallisto for sequence $sequence into the db" >> $scriptlog 2>&1 140 114 setstatuslogpath=$logpath/setstatus/fillcallisto/$no 141 if [ ! -d $setstatuslogpath ] 142 then 143 mkdir -pv $setstatuslogpath >> $scriptlog 2>&1 144 if [ ! -d $setstatuslogpath ] 145 then 146 echo "could not make setstatuslogpath "$setstatuslogpath >> $scriptlog 2>&1 147 continue 148 fi 149 fi 115 makedir $setstatuslogpath >> $scriptlog 2>&1 150 116 setstatuslog=$setstatuslogpath/setstatus-fillcallisto 117 151 118 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog-$sequence.log | grep int | sed -e 's/(int)//'` 152 119 case $check4 in -
trunk/MagicSoft/Mars/datacenter/scripts/fillstar
r7232 r7233 43 43 44 44 scriptlogpath=$logpath/run/fillstar/`date +%Y/%m/%d` 45 if [ ! -d $scriptlogpath ] 46 then 47 mkdir -pv $scriptlogpath 48 if [ ! -d $scriptlogpath ] 49 then 50 echo "could not make scriptlogpath "$scriptlogpath 51 exit 52 fi 53 fi 54 45 makedir $scriptlogpath 55 46 scriptlog=$scriptlogpath/runfillstar-$datetime.log 56 47 57 48 date >> $scriptlog 2>&1 58 49 59 60 if [ ! -d $getstatuslogpath ] 61 then 62 mkdir -pv $getstatuslogpath >> $scriptlog 2>&1 63 if [ ! -d $getstatuslogpath ] 64 then 65 echo "could not make getstatuslogpath "$getstatuslogpath >> $scriptlog 2>&1 66 date >> $scriptlog 2>&1 67 exit 68 fi 69 fi 50 makedir $getstatuslogpath >> $scriptlog 2>&1 70 51 71 52 cd $mars … … 111 92 fillstarlogpath=$logpath/fillstar/$no 112 93 echo "fillstarlogpath: "$fillstarlogpath >> $scriptlog 2>&1 113 if [ ! -d $fillstarlogpath ] 114 then 115 mkdir -pv $fillstarlogpath >> $scriptlog 2>&1 116 if [ ! -d $fillstarlogpath ] 117 then 118 echo "could not make fillstarlogpath $fillstarlogpath -> continue " >> $scriptlog 2>&1 119 continue 120 fi 121 fi 94 makedir $fillstarlogpath >> $scriptlog 2>&1 122 95 fillstarlog=$fillstarlogpath/fillstar-$sequence.log 123 96 … … 128 101 echo "-> inserting the status for fillstar for sequence $sequence into the db" >> $scriptlog 2>&1 129 102 setstatuslogpath=$logpath/setstatus/fillstar/$no 130 if [ ! -d $setstatuslogpath ] 131 then 132 mkdir -pv $setstatuslogpath >> $scriptlog 2>&1 133 if [ ! -d $setstatuslogpath ] 134 then 135 echo "could not make setstatuslogpath "$setstatuslogpath >> $scriptlog 2>&1 136 continue 137 fi 138 fi 103 makedir $setstatuslogpath >> $scriptlog 2>&1 139 104 setstatuslog=$setstatuslogpath/setstatus-fillstar-$no2.log 105 140 106 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 141 107 case $check4 in -
trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets
r7232 r7233 38 38 39 39 scriptlogpath=$logpath/run/insertdatasets/`date +%Y/%m` 40 if [ ! -d $scriptlogpath ] 41 then 42 mkdir -pv $scriptlogpath 43 if [ ! -d $scriptlogpath ] 44 then 45 echo "could not make scriptlogpath "$scriptlogpath 46 exit 47 fi 48 fi 40 makedir $scriptlogpath 49 41 50 42 scriptlog=$scriptlogpath/insertdatasets-$datetime.log … … 97 89 98 90 insertdatasetpath=$logpath/insertdataset/$no3 99 if [ ! -d $insertdatasetpath ] 100 then 101 mkdir -pv $insertdatasetpath >> $scriptlog 2>&1 102 if [ ! -d $insertdatasetpath ] 103 then 104 echo "could not make insertdatasetpath "$insertdatasetpath >> $scriptlog 2>&1 105 continue 106 fi 107 fi 91 makedir $insertdatasetpath >> $scriptlog 2>&1 108 92 insertdatasetlog=$insertdatasetpath/insertdataset-$no3.log 93 109 94 check0=`root -q -b $macrospath/insertdataset.C+\("\"$no2\""\,"\"$source\""\,"\"$wobble\"",kFALSE\) | tee $insertdatasetlog | grep int | sed -e 's/(int)//'` 110 95 case $check0 in -
trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
r7232 r7233 46 46 47 47 scriptlogpath=$logpath/run/callisto/`date +%Y/%m/%d` 48 if [ ! -d $scriptlogpath ] 49 then 50 mkdir -pv $scriptlogpath 51 if [ ! -d $scriptlogpath ] 52 then 53 echo "could not make scriptlogpath "$scriptlogpath 54 exit 55 fi 56 fi 57 48 makedir $scriptlogpath 58 49 scriptlog=$scriptlogpath/runcallisto-$datetime.log 59 50 60 51 date >> $scriptlog 2>&1 61 52 62 63 if [ ! -d $getstatuslogpath ] 64 then 65 mkdir -pv $getstatuslogpath >> $scriptlog 2>&1 66 if [ ! -d $getstatuslogpath ] 67 then 68 echo "could not make getstatuslogpath "$getstatuslogpath >> $scriptlog 2>&1 69 date >> $scriptlog 2>&1 70 exit 71 fi 72 fi 53 makedir $getstatuslogpath >> $scriptlog 2>&1 73 54 74 55 cd $mars … … 178 159 outpath="$datapath/callisto/$no/$no2" 179 160 echo "outpath: "$outpath >> $scriptlog 2>&1 180 if [ ! -d $outpath ] 181 then 182 mkdir -pv $outpath >> $scriptlog 2>&1 183 if [ ! -d $outpath ] 184 then 185 echo "could not make outpath $outpath -> continue " >> $scriptlog 2>&1 186 continue 187 fi 188 fi 161 makedir $outpath >> $scriptlog 2>&1 162 189 163 sequfile="$sequpath/$no/sequence$no2.txt" 190 164 echo "sequfile: "$sequfile >> $scriptlog 2>&1 … … 216 190 217 191 merpplogpath=$outpath"/merpplogs" 218 if [ ! -d $merpplogpath ] 219 then 220 mkdir -pv $merpplogpath >> $scriptlog 2>&1 221 if [ ! -d $merpplogpath ] 222 then 223 echo "could not make merpplogpath "$merpplogpath >> $scriptlog 2>&1 224 continue 225 fi 226 fi 192 makedir $merpplogpath >> $scriptlog 2>&1 227 193 228 194 for calfile in ${calfiles[@]} … … 279 245 echo "inserting the status for callisto for sequence $sequence into the db" >> $scriptlog 2>&1 280 246 setstatuslogpath=$logpath/setstatus/callisto/$no 281 if [ ! -d $setstatuslogpath ] 282 then 283 mkdir -pv $setstatuslogpath >> $scriptlog 2>&1 284 if [ ! -d $setstatuslogpath ] 285 then 286 echo "could not make setstatuslogpath "$setstatuslogpath >> $scriptlog 2>&1 287 continue 288 fi 289 fi 247 makedir $setstatuslogpath >> $scriptlog 2>&1 290 248 setstatuslog=$setstatuslogpath/setstatus-callisto-$no2.log 249 291 250 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 292 251 case $check4 in -
trunk/MagicSoft/Mars/datacenter/scripts/runganymed
r7232 r7233 44 44 45 45 scriptlogpath=$logpath/run/ganymed/`date +%Y/%m/%d` 46 if [ ! -d $scriptlogpath ] 47 then 48 mkdir -pv $scriptlogpath 49 if [ ! -d $scriptlogpath ] 50 then 51 echo "could not make scriptlogpath "$scriptlogpath 52 exit 53 fi 54 fi 46 makedir $scriptlogpath 55 47 56 48 scriptlog=$scriptlogpath/runganymed-$datetime.log … … 58 50 date >> $scriptlog 2>&1 59 51 60 61 if [ ! -d $getstatuslogpath ] 62 then 63 mkdir -pv $getstatuslogpath >> $scriptlog 2>&1 64 if [ ! -d $getstatuslogpath ] 65 then 66 echo "could not make getstatuslogpath "$getstatuslogpath >> $scriptlog 2>&1 67 date >> $scriptlog 2>&1 68 exit 69 fi 70 fi 52 makedir $getstatuslogpath >> $scriptlog 2>&1 71 53 72 54 cd $mars … … 172 154 outpath="$datapath/ganymed/$no/$no2" 173 155 echo "outpath: "$outpath >> $scriptlog 2>&1 174 if [ ! -d $outpath ] 175 then 176 mkdir -pv $outpath >> $scriptlog 2>&1 177 if [ ! -d $outpath ] 178 then 179 echo "could not make outpath $outpath -> continue " >> $scriptlog 2>&1 180 continue 181 fi 182 fi 156 makedir $outpath >> $scriptlog 2>&1 157 183 158 datasetfile="$datasetpath/$no/dataset$no2.txt" 184 159 echo "datasetfile: "$datasetfile >> $scriptlog 2>&1 … … 201 176 echo "-> inserting the status for ganymed for dataset $dataset into the db" >> $scriptlog 2>&1 202 177 setstatuslogpath=$logpath/setstatus/ganymed/$no 203 if [ ! -d $setstatuslogpath ] 204 then 205 mkdir -pv $setstatuslogpath >> $scriptlog 2>&1 206 if [ ! -d $setstatuslogpath ] 207 then 208 echo "could not make setstatuslogpath "$setstatuslogpath >> $scriptlog 2>&1 209 continue 210 fi 211 fi 178 makedir $setstatuslogpath >> $scriptlog 2>&1 212 179 setstatuslog=$setstatuslogpath/setstatus-ganymed-$no2.log 180 213 181 check4=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 214 182 case $check4 in -
trunk/MagicSoft/Mars/datacenter/scripts/runstar
r7232 r7233 44 44 45 45 scriptlogpath=$logpath/run/star/`date +%Y/%m/%d` 46 if [ ! -d $scriptlogpath ] 47 then 48 mkdir -pv $scriptlogpath 49 if [ ! -d $scriptlogpath ] 50 then 51 echo "could not make scriptlogpath "$scriptlogpath 52 exit 53 fi 54 fi 55 46 makedir $scriptlogpath 56 47 scriptlog=$scriptlogpath/runstar-$datetime.log 57 48 58 49 date >> $scriptlog 2>&1 59 50 60 61 if [ ! -d $getstatuslogpath ] 62 then 63 mkdir -pv $getstatuslogpath >> $scriptlog 2>&1 64 if [ ! -d $getstatuslogpath ] 65 then 66 echo "could not make getstatuslogpath "$getstatuslogpath >> $scriptlog 2>&1 67 date >> $scriptlog 2>&1 68 exit 69 fi 70 fi 51 makedir $getstatuslogpath >> $scriptlog 2>&1 71 52 72 53 cd $mars … … 175 156 echo "inpath: "$inpath >> $scriptlog 2>&1 176 157 echo "outpath: "$outpath >> $scriptlog 2>&1 177 if [ ! -d $outpath ] 178 then 179 mkdir -pv $outpath >> $scriptlog 2>&1 180 if [ ! -d $outpath ] 181 then 182 echo "could not make outpath $outpath -> continue " >> $scriptlog 2>&1 183 continue 184 fi 185 fi 158 makedir $outpath >> $scriptlog 2>&1 159 186 160 sequfile="$sequpath/$no/sequence$no2.txt" 187 161 echo "sequfile: "$sequfile >> $scriptlog 2>&1 … … 195 169 echo "-> inserting the status for star for sequence $sequence into the db" >> $scriptlog 2>&1 196 170 setstatuslogpath=$logpath/setstatus/star/$no 197 if [ ! -d $setstatuslogpath ] 198 then 199 mkdir -pv $setstatuslogpath >> $scriptlog 2>&1 200 if [ ! -d $setstatuslogpath ] 201 then 202 echo "could not make setstatuslogpath "$setstatuslogpath >> $scriptlog 2>&1 203 continue 204 fi 205 fi 171 makedir $setstatuslogpath >> $scriptlog 2>&1 206 172 setstatuslog=$setstatuslogpath/setstatus-star-$no2.log 173 207 174 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 208 175 case $check4 in -
trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
r7232 r7233 45 45 datasetpath=/magic/datasets 46 46 47 48 function makedir() 49 { 50 if [ ! -d $@ ] 51 then 52 mkdir -pv $@ 53 if [ ! -d $@ ] 54 then 55 echo "could not make dir "$@ 56 exit 57 fi 58 fi 59 } -
trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles
r7232 r7233 43 43 44 44 scriptlogpath=$logpath/run/writesequencefiles/`date +%Y/%m/%d` 45 if [ ! -d $scriptlogpath ] 46 then 47 mkdir -pv $scriptlogpath 48 if [ ! -d $scriptlogpath ] 49 then 50 echo "could not make scriptlogpath "$scriptlogpath 51 exit 52 fi 53 fi 54 45 makedir $scriptlogpath 55 46 scriptlog=$scriptlogpath/runwritesequencefiles-$datetime.log 56 47 57 48 date >> $scriptlog 2>&1 58 49 59 60 if [ ! -d $getstatuslogpath ] 61 then 62 mkdir -pv $getstatuslogpath >> $scriptlog 2>&1 63 if [ ! -d $getstatuslogpath ] 64 then 65 echo "could not make getstatuslogpath "$getstatuslogpath >> $scriptlog 2>&1 66 date >> $scriptlog 2>&1 67 exit 68 fi 69 fi 50 makedir $getstatuslogpath >> $scriptlog 2>&1 70 51 71 52 cd $mars … … 108 89 no2=`printf %08d $sequence` 109 90 sequencepath=$sequpath/$no 110 if [ ! -d $sequencepath ] 111 then 112 mkdir -pv $sequencepath >> $scriptlog 2>&1 113 if [ ! -d $sequencepath ] 114 then 115 echo "could not make sequencepath $sequencepath -> continue " >> $scriptlog 2>&1 116 continue 117 fi 118 fi 91 makedir $sequencepath >> $scriptlog 2>&1 119 92 120 93 writesequencefilelogpath=$logpath/writesequencefile/$no 121 94 echo "writesequencefilelogpath: "$writesequencefilelogpath >> $scriptlog 2>&1 122 if [ ! -d $writesequencefilelogpath ] 123 then 124 mkdir -pv $writesequencefilelogpath >> $scriptlog 2>&1 125 if [ ! -d $writesequencefilelogpath ] 126 then 127 echo "could not make writesequencefilelogpath $writesequencefilelogpath -> continue " >> $scriptlog 2>&1 128 continue 129 fi 130 fi 95 makedir $writesequencefilelogpath >> $scriptlog 2>&1 131 96 132 97 echo "write sequencefile for sequence $sequence" >> $scriptlog 2>&1 … … 136 101 echo "-> inserting the status for writesequencefile for sequence $sequence into the db" >> $scriptlog 2>&1 137 102 setstatuslogpath=$logpath/setstatus/writesequencefile/$no 138 if [ ! -d $setstatuslogpath ] 139 then 140 mkdir -pv $setstatuslogpath >> $scriptlog 2>&1 141 if [ ! -d $setstatuslogpath ] 142 then 143 echo "could not make setstatuslogpath "$setstatuslogpath >> $scriptlog 2>&1 144 continue 145 fi 146 fi 103 makedir $setstatuslogpath >> $scriptlog 2>&1 147 104 setstatuslog=$setstatuslogpath/setstatus-writesequencefile-$no2.log 105 148 106 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 149 107 case $check4 in
Note:
See TracChangeset
for help on using the changeset viewer.