Changeset 7944 for trunk/MagicSoft/Mars/datacenter/scripts/insertsequences
- Timestamp:
- 08/25/06 22:09:49 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/insertsequences
r7938 r7944 33 33 # 34 34 35 source `dirname $0`/sourcefile 36 printprocesslog "INFO starting $0" 35 37 program=insertsequences 36 source `dirname $0`/sourcefile37 38 38 39 set -C 39 40 40 cd $mars 41 42 datetime=`date +%F-%H-%M-%S` 43 year=`date +%Y` 44 lockfile=$lockpath/lock-insertsequences.txt 45 46 scriptlogpath=$runlogpath/$program 47 makedir $scriptlogpath 48 49 scriptlog=$scriptlogpath/insertsequences-$datetime.log 50 41 scriptlog=$runlogpath/$program-$datetime.log 51 42 date >> $scriptlog 2>&1 52 43 53 44 # check if script is already running 45 lockfile=$lockpath/lock-$program.txt 54 46 checklock >> $scriptlog 2>&1 55 47 … … 61 53 echo "" >> $scriptlog 2>&1 62 54 55 cd $mars 56 63 57 # process sequencefiles: insert information into the database 64 58 for sequencefile in ${sequencefiles[@]} 65 59 do 60 printprocesslog "INFO inserting sequence from file $sequencefile" 66 61 echo "file: "$sequencefile >> $scriptlog 2>&1 67 62 no=`echo $sequencefile | cut -c 31-38` 68 no =`echo $no | cut -c 1-4`69 insertsequencepath=$logpath/ insertsequence/$no63 no2=`echo $no | cut -c 1-4` 64 insertsequencepath=$logpath/$program/$no2 70 65 makedir $insertsequencepath >> $scriptlog 2>&1 71 insertsequencelog=$insertsequencepath/ insertsequence-$no.log66 insertsequencelog=$insertsequencepath/$program-$no.log 72 67 73 68 check0=`root -q -b $macrospath/insertsequence.C+\("\"$sequencefile\""\,kFALSE\) | tee $insertsequencelog | grep int | sed -e 's/(int)//'` 74 69 case $check0 in 75 1) echo "check0=$check0 -> everything ok " >> $scriptlog 2>&1 ;; 76 *) echo "check0=$check0 -> ERROR " >> $scriptlog 2>&1 ;; 70 1) echo "check0=$check0 -> everything ok " >> $scriptlog 2>&1 71 printprocesslog "INFO sequence $no2 successfully inserted" 72 ;; 73 0) echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 74 printprocesslog "WARN connection to DB failed" 75 check="no" 76 ;; 77 *) echo "check0=$check0 -> ERROR " >> $scriptlog 2>&1 78 printprocesslog "ERROR $program.C failed for sequence $no2" 79 ;; 77 80 esac 78 81 done 79 82 80 rm -v $lockpath/lock-insertsequences.txt >> $scriptlog 2>&1 83 finish >> $scriptlog 2>&1 81 84 82 set +C83 84 date >> $scriptlog 2>&185
Note:
See TracChangeset
for help on using the changeset viewer.