Ignore:
Timestamp:
08/02/06 14:03:06 (18 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7835 r7836  
    4040
    4141datetime=`date +%F-%H-%M-%S`
    42 webdir=/www/htdocs/datacenter
    4342
    4443scriptlogpath=$logpath/run/dowebplots/`date +%Y/%m/%d`
     
    7473
    7574
    76 #finding all rootfiles in the webdirectory, that were modified in the last 3 days
     75#finding all rootfiles in the data directory, that were modified in the last 3 days
    7776#this are all statusdisplays
    78 rootfiles=`find $webdir/$type/ -maxdepth 10 -name '*.root' -mtime -3 | grep -v '_I_' | grep -v '_Y_' | grep -v 'subsystemdata' | grep -v 'star_lapalma' | grep -v 'summary'`
     77rootfiles=`find $datapath/$type/ -maxdepth 10 -name '*.root' -mtime -3 | grep -v '_I_' | grep -v '_Y_' | grep -v 'summary'`
    7978
    8079#exit if no rootfiles are found
     
    105104   if [ "$datepsfile" = "" ]
    106105   then
    107       echo "date of psfile is empty -> the file $psfile doesn't exist" >> $scriptlog 2>&1
     106      echo "date of psfile is empty, i.e. the file $psfile doesn't exist" >> $scriptlog 2>&1
    108107      echo " -> setting date to 0 and producing psfile..." >> $scriptlog 2>&1
    109108      datepsfile=0
     
    113112   echo "date of rootfile: $daterootfile" >> $scriptlog 2>&1
    114113   echo "date of psfile:   $datepsfile"   >> $scriptlog 2>&1
    115 
    116114   #if the psfile is newer than the rootfile
    117115   #no plots have to be done -> continue
    118116   if [ "$datepsfile" -gt "$daterootfile" ] >> $scriptlog 2>&1
    119117   then
    120       echo "psfile is older than rootfile -> continue " >> $scriptlog 2>&1
     118      echo "psfile is newer than rootfile -> continue " >> $scriptlog 2>&1
    121119      continue
    122120   fi
     
    137135done
    138136
    139 echo "removing old files" >> $scriptlog 2>&1
    140 #make sure, that old plots of files, that are already removed from disk,
    141 #  are deleted also in the webdirectory
    142 #this has to be done, as ps and png files are excluded from rsync, and
    143 #as rsync is done with --delete option (script /home/operator/condor/webupdate)
    144 
    145 #find all directories with plots
    146 dirs=`find $webdir/$type/* -type d | grep -v merpplogs`
    147 
    148 for dir in ${dir[@]}
    149 do
    150    #find psfiles in directory
    151    psfiles=`ls $dir/*.ps`
    152    #continue, if there are no psfiles
    153    if [ "$psfiles" == "" ]
    154    then
    155       continue
    156    fi
    157    
    158    for psfile in ${psfiles[@]}
    159    do
    160       #create name of corresponding rootfile
    161       rootfile=`echo $psfile | sed -e 's/.ps$/.root/g'`
    162       #delete ps and pngfiles if rootfile is not existing
    163       if ! ls $rootfile >> $scriptlog 2>&1
    164       then
    165          echo "deleting old plots for $rootfile..." >> $scriptlog 2>&1
    166          path=`dirname $psfile`
    167          rm -v $psfile >> $scriptlog 2>&1
    168          rm -v $path/*.png >> $scriptlog 2>&1
    169       fi
    170    done
    171 done
    172 
    173137rm -v $lockfile >> $scriptlog 2>&1
    174138
Note: See TracChangeset for help on using the changeset viewer.