Ignore:
Timestamp:
04/17/07 16:05:32 (18 years ago)
Author:
snruegam
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles

    r8331 r8410  
    2020#   Author(s): Daniela Dorner  08/2004 <mailto:dorner@astro.uni-wuerzburg.de>
    2121#
    22 #   Copyright: MAGIC Software Development, 2000-2006
     22#   Copyright: MAGIC Software Development, 2000-2007
    2323#
    2424#
     
    4949
    5050printprocesslog "INFO moving directories from fromlapalma to fromtape"
    51 #find directories which have to be copied
     51# find directories which have to be copied
    5252dirs=`ls /magic/datacenter/fromlapalma/RAWchk/*/*.finished | sed -e 's/RAWchk/RAW/g' | cut -d/ -f1-6`
    5353if [ ! "$dirs" == "" ]
    5454then
    55    # change permission for this dirctories
     55   # change permission for this directories
    5656   ssh lapalma@apollo chmod -R g+w $dirs >> $scriptlog 2>&1
    5757   # move directories to the tapedirectory
    58    mv -v $dirs /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1
     58   mv -v $dirs /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1
     59fi
     60
     61printprocesslog "INFO moving directories from muxdata to rawdata"
     62# find directories which have to be copied
     63days=`find /magic/datacenter/fromtape/muxdata/* -type d`
     64if [ ! "$days" == "" ]
     65then
     66   # move directories to the tapedirectory
     67   mv -v $days /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1
    5968fi
    6069
     
    6574if [ "$rawfiles" == "" ]
    6675then
    67    echo "no files to move -> exit" >> $scriptlog 2>&1 
    68    finish >> $scriptlog 2>&1 
     76   echo "no files to move -> exit" >> $scriptlog 2>&1
     77   finish >> $scriptlog 2>&1
    6978fi
    7079
    71 printprocesslog "INFO moving moving rawfiles to $datapath/rawfiles"
     80printprocesslog "INFO moving rawfiles to $datapath/rawfiles"
    7281for rawfile in $rawfiles
    7382do
    7483# workaround for rawfiles with wrong timing
    75 newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles-wrong-timing/g' -e 's/_/\//1' -e 's/_/\//1'`
     84 newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles-wrong-timing/g' -e 's/_/\//1' -e 's/_/\//1'`
    7685   newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'`
    7786   newdir=`dirname $newrawfile`
    78    makedir $newdir >> $scriptlog 2>&1 
     87   makedir $newdir >> $scriptlog 2>&1
    7988
    80    mv -v $rawfile $newrawfile >> $scriptlog 2>&1 
     89   mv -v $rawfile $newrawfile >> $scriptlog 2>&1
    8190done
    8291
    83 rmdir -v /magic/datacenter/fromtape/rawdata/* >> $scriptlog 2>&1 
     92rmdir -v /magic/datacenter/fromtape/rawdata/* >> $scriptlog 2>&1
    8493
    8594printprocesslog "INFO launching filesondisk"
    86 echo "launching filesondisk" >> $scriptlog 2>&1 
     95echo "launching filesondisk" >> $scriptlog 2>&1
    8796$scriptspath/filesondisk&
    8897
Note: See TracChangeset for help on using the changeset viewer.