Ignore:
Timestamp:
08/25/06 22:09:49 (18 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/insertsequences

    r7938 r7944  
    3333#
    3434
     35source `dirname $0`/sourcefile
     36printprocesslog "INFO starting $0"
    3537program=insertsequences
    36 source `dirname $0`/sourcefile
    3738
    3839set -C
    3940
    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 
     41scriptlog=$runlogpath/$program-$datetime.log
    5142date >> $scriptlog 2>&1
    5243
    5344# check if script is already running
     45lockfile=$lockpath/lock-$program.txt
    5446checklock  >> $scriptlog 2>&1
    5547
     
    6153echo "" >> $scriptlog 2>&1
    6254
     55cd $mars
     56
    6357# process sequencefiles: insert information into the database
    6458for sequencefile in ${sequencefiles[@]}
    6559do
     60   printprocesslog "INFO inserting sequence from file $sequencefile"
    6661   echo "file: "$sequencefile >> $scriptlog 2>&1
    6762   no=`echo $sequencefile | cut -c 31-38`
    68    no=`echo $no | cut -c 1-4`
    69    insertsequencepath=$logpath/insertsequence/$no
     63   no2=`echo $no | cut -c 1-4`
     64   insertsequencepath=$logpath/$program/$no2
    7065   makedir $insertsequencepath >> $scriptlog 2>&1
    71    insertsequencelog=$insertsequencepath/insertsequence-$no.log
     66   insertsequencelog=$insertsequencepath/$program-$no.log
    7267
    7368   check0=`root -q -b $macrospath/insertsequence.C+\("\"$sequencefile\""\,kFALSE\) | tee $insertsequencelog | grep int | sed -e 's/(int)//'`
    7469   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           ;;
    7780   esac
    7881done
    7982
    80 rm -v $lockpath/lock-insertsequences.txt >> $scriptlog 2>&1
     83finish >> $scriptlog 2>&1
    8184
    82 set +C
    83 
    84 date  >> $scriptlog 2>&1
    85 
Note: See TracChangeset for help on using the changeset viewer.