Ignore:
Timestamp:
08/12/08 10:20:17 (16 years ago)
Author:
snruegam
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r8886 r9114  
    6262
    6363date | tee ${checkpath}/tape_${id}.md5.lapalma | tee ${checkpath}/tape_${id}.md5.wue
     64muxslog=`grep muxdata/20[01][0-9].*/20[01][0-9].*.raw $file | wc -l`
    6465
    6566# read the tapecont file line by line
     
    6768do
    6869   muxchk=`echo $line | cut -d/ -f1`
    69    type=`echo $line | cut -d_ -f7 | cut -c0-5`
     70   type=`echo $line | sed -e 's/.*20[01][0-9]\{5\}_.*\(.raw\)/\1/' | cut -c 0-4`
    7071   # only check muxdata rawfiles, not cc-, caco- or drivelog-files
    71    if [ "$muxchk" = "muxdata" ] && [ "$type" = "E.raw" ]
     72   if [ "$muxchk" = "muxdata" ] && [ "$type" = ".raw" ]
    7273   then
    7374      sum=($line)
     
    103104echo "Wrote checksums to ${checkpath}/tape_${id}.md5.lapalma and ${checkpath}/tape_${id}.md5.wue. Comparing now."
    104105
    105 
    106106# check for differences in the checksums
    107107output=`diff ${checkpath}/tape_${id}.md5.lapalma ${checkpath}/tape_${id}.md5.wue`
     
    109109if [ "$output" = "" ]
    110110then
    111    echo "All checksums are ok! Launching movingrawfiles now."# to be included
     111   echo "All checksums are identical!"
     112   muxschk=`grep muxdata/20[01][0-9].*/20[01][0-9].*.raw ${checkpath}/tape_${id}.md5.wue | wc -l`
     113   if [ $muxslog == $muxschk ]
     114   then
     115      echo "Number of checked files matches. Launching movingrawfiles now. (to be included)" | tee -a ${checkpath}/tape_${id}.md5.lapalma | tee -a ${checkpath}/tape_${id}.md5.wue
     116   else
     117      echo "Number of checked files doesn't match number of extracted files. Something went wrong..." | tee -a ${checkpath}/tape_${id}.md5.lapalma | tee -a ${checkpath}/tape_${id}.md5.wue
     118   fi
    112119else
    113120   echo -e "The files are not identical! diff found the following differences:\n$output"
Note: See TracChangeset for help on using the changeset viewer.