/[CCFs]/bin/mlovccf
ViewVC logotype

Diff of /bin/mlovccf

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

revision 1.24 by ccflib, Fri Nov 13 16:09:22 2020 UTC revision 1.26 by ccflib, Tue Dec 28 09:29:36 2021 UTC
# Line 18  Line 18 
18  # This is obtained from the report of all observations that the XSA makes to CDS,  # This is obtained from the report of all observations that the XSA makes to CDS,
19  # xsaobslog.txt (http://nxsa.esac.esa.int/ftp_public/cfs_obslog/xsaobslog.txt).  # xsaobslog.txt (http://nxsa.esac.esa.int/ftp_public/cfs_obslog/xsaobslog.txt).
20  #  #
21  # $Id: mlovccf,v 1.23 2019/11/12 16:00:29 ccflib Exp $  # $Id: mlovccf,v 1.25 2021/11/08 13:23:09 ccflib Exp $
22    
23  # Next two lines allow to submit this script to the grid  # Next two lines allow to submit this script to the grid
24  # request Bourne shell as shell for job  # request Bourne shell as shell for job
# Line 160  if [ ! -f "${VALID_CCF}/${validccflist}" Line 160  if [ ! -f "${VALID_CCF}/${validccflist}"
160  fi  fi
161    
162  VALIDCONSTITUENTSDIR="/home/ccflib/ftp-area/valid_constituents"  VALIDCONSTITUENTSDIR="/home/ccflib/ftp-area/valid_constituents"
163    # Checks that the VALIDCONSTITUENTSDIR directory is writable by me
164    touch ${VALIDCONSTITUENTSDIR}/test 2> /dev/null
165    if [ "$?" != "0" ] ; then
166            [ -f "${mailfile}" ] && rm -rf ${mailfile}
167            echo "${VALIDCONSTITUENTSDIR} is not writable. Can not work" >> $mailfile
168            mailnotify "mvloccf: Error: ${VALIDCONSTITUENTSDIR} is not writable - Abort!" $mailfile
169            rm ${mailfile}
170            exit
171    fi
172  rm -rf ${VALIDCONSTITUENTSDIR}/*  rm -rf ${VALIDCONSTITUENTSDIR}/*
173    
174  # This operation can only succeed because the subdir valid has enable the write permission  # This operation can only succeed because the subdir valid has enable the write permission
175  # for the group "sas" (g=rwx), provided that CCFs belong to sasbuild(5153):sas.  # for the group "sas" (g=rwx), provided that CCFs belong to sasbuild(5153):sas.
176  VALIDCCFDIRINTRANET="/ccf/valid"  VALIDCCFDIRINTRANET="/ccf/valid"
177    # Checks that the VALIDCCFDIRINTRANET directory is writable by me
178    touch ${VALIDCCFDIRINTRANET}/test 2> /dev/null
179    if [ "$?" != "0" ] ; then
180            [ -f "${mailfile}" ] && rm -rf ${mailfile}
181            echo "${VALIDCCFDIRINTRANET} is not writable. Can not work" >> $mailfile
182            mailnotify "mvloccf: Error: ${VALIDCCFDIRINTRANET} is not writable - Abort!" $mailfile
183            rm ${mailfile}
184            exit
185    fi
186    
187  rm -rf ${VALIDCCFDIRINTRANET}/*  rm -rf ${VALIDCCFDIRINTRANET}/*
188    
189  CONSTITUENTSDIR="/home/ccflib/ftp-area/constituents"  CONSTITUENTSDIR="/home/ccflib/ftp-area/constituents"
# Line 220  case "$host" in Line 239  case "$host" in
239          sasbld01n|sasbld02n)          sasbld01n|sasbld02n)
240                  export SASBUILD_LOCAL="/sasbuild/local/${host}/GNU_CC_CXX_9.2.0"                  export SASBUILD_LOCAL="/sasbuild/local/${host}/GNU_CC_CXX_9.2.0"
241                  ;;                  ;;
242          sciggw7|scigvn7-*)          sciggw|scigrid-*)
243                  export SASBUILD_LOCAL="/sasbuild/local/sasbld04n/GNU_CC_CXX_9.2.0"                  export SASBUILD_LOCAL="/sasbuild/local/sasbld04n/GNU_CC_CXX_9.2.0"
244                  ;;                  ;;
245          *) echo "Error: Unsupported host $host" ; exit 1 ;;          *) echo "Error: Unsupported host $host" ; exit 1 ;;
# Line 275  fi Line 294  fi
294  #  #
295    
296  confsas_output="${VALID_CCF}/confsas_output"  confsas_output="${VALID_CCF}/confsas_output"
297  source /sas/bin/confsas > ${confsas_output}  source /sas/bin/confsas > ${confsas_output} 2>&1
298  confsas_ok=`cat ${confsas_output}`  confsas_error=`cat ${confsas_output} | grep -c Error`
299    
300  if [ "$DEBUG" ] ; then  if [ "$DEBUG" ] ; then
301          echo "DEBUG: mlovccf: main: Executed /sas/bin/confsas with output: ${confsas_ok}"          echo "DEBUG: mlovccf: main: Executed /sas/bin/confsas with output: ${confsas_ok}"
302  fi  fi
303    
304  if [ -n "${confsas_ok}" ] ; then  if [ "${confsas_error}" != "0" ] ; then
305          echo "mlovccf: SAS initialization failed with error" >> ${mailfile}          echo "mlovccf: SAS initialization failed with error" >> ${mailfile}
306          cat ${confsas_output}                                >> ${mailfile}          cat ${confsas_output}                                >> ${mailfile}
307          mailnotify "mlovccf: SAS initialisation failed" ${mailfile}          mailnotify "mlovccf: SAS initialisation failed" ${mailfile}
308          if [ "$DEBUG" ] ; then          if [ "$DEBUG" ] ; then
309                  echo "DEBUG: mlovccf: main: SAS initialization failed. Notification mail sent!"                  echo "DEBUG: mlovccf: main: SAS initialization failed. Notification mail sent!"
310          fi          fi
         rm -v ${mailfile}  
         rm -v ${confsas_output}  
311          exit 1          exit 1
312  fi  fi
313    
314    rm -v ${mailfile}
315    rm -v ${confsas_output}
316    
317  source $HOME/setsas.sh 1> /dev/null  source $HOME/setsas.sh 1> /dev/null
318    
319  if [ "$DEBUG" ] ; then  if [ "$DEBUG" ] ; then
# Line 480  rm ${VALID_CCF}/ccf_issues_for*.txt Line 500  rm ${VALID_CCF}/ccf_issues_for*.txt
500    
501  # 6. Fill in the Valid CCF Set dir with the proper CCFs  # 6. Fill in the Valid CCF Set dir with the proper CCFs
502    
503  #fillvalidccfdir "all_ccfs_${now}.txt"  fillvalidccfdir "all_ccfs_${now}.txt"
504    
505    
506  #[ -f "${mailfile}" ] && rm -rf ${mailfile}  [ -f "${mailfile}" ] && rm -rf ${mailfile}
507  #echo "Valid CCF Set successfully copied to ${VALIDCONSTITUENTSDIR}" >> $mailfile  echo "Valid CCF Set successfully copied to ${VALIDCONSTITUENTSDIR}" >> $mailfile
508  #echo "Valid CCF Set successfully copied to ${VALIDCCFDIRINTRANET}"  >> $mailfile  echo "Valid CCF Set successfully copied to ${VALIDCCFDIRINTRANET}"  >> $mailfile
509  #mailnotify "mvloccf: Valid CCF Set created successfully" $mailfile  mailnotify "mvloccf: Valid CCF Set created successfully" $mailfile
510  #rm ${mailfile}  rm ${mailfile}

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.27