/[CCFs]/bin/cif_manager
ViewVC logotype

Diff of /bin/cif_manager

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by ccflib, Fri Mar 6 16:06:19 2015 UTC revision 1.4 by ccflib, Mon Apr 11 08:28:28 2016 UTC
# Line 12  Line 12 
12  #  #
13  # This script is run 15 min after the hour for all hours of day by cron.  # This script is run 15 min after the hour for all hours of day by cron.
14  #  #
15  # $Id: cif_manager,v 1.1 2015/03/06 15:38:56 ccflib Exp $  # $Id: cif_manager,v 1.3 2015/03/09 10:01:59 ccflib Exp $
16    
17    
18  # 1) Synchronizes both directories  # 1) Synchronizes both directories
# Line 22  rsync -a -e ssh ccflib@xmm.esac.esa.int: Line 22  rsync -a -e ssh ccflib@xmm.esac.esa.int:
22    
23    
24  # 2) Registers any new file in DELIVERY_LOG  # 2) Registers any new file in DELIVERY_LOG
25    therearefiles=`ls -1tr /home/ccflib/ftp-area/download | grep -c xmm-newton.cif`
26  for file in `ls -1tr /home/ccflib/ftp-area/download/*xmm-newton.cif`  if [ "$therearefiles" != "0" ] ; then
27  do          for file in `ls -1tr /home/ccflib/ftp-area/download/*xmm-newton.cif`
28          file=`basename $file`          do
29          registered=`grep -c "$file" /home/ccflib/ftp-area/download/DELIVERY_LOG`                  filebase=`basename $file`
30          [ "$registered" = "1" ] && continue                  registered=`grep -c "$filebase" /home/ccflib/ftp-area/download/DELIVERY_LOG`
31          mtime=`stat --printf=%y $file | awk -F"." '{print $1}'`                  [ "$registered" = "1" ] && continue
32          printf "%-40s %-10s %-10s\n" $file $mtime                  mtime=`stat --printf=%y $file | awk -F"." '{print $1}'`
33  done >> /home/ccflib/ftp-area/download/DELIVERY_LOG                  printf "%-40s %-10s %-10s\n" $filebase $mtime
34            done >> /home/ccflib/ftp-area/download/DELIVERY_LOG
35    fi
36    
37  # 3) Runs on xvsoc01 through ssh the clean_cif_files and clean_uploaded_files scripts  # 3) Runs on xvsoc01 through ssh the clean_cif_files and clean_uploaded_files scripts
38    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.27