Changeset 715


Ignore:
Timestamp:
10/12/12 10:39:49 (12 years ago)
Author:
sdipsl
Message:
  • cosmetics. curie first
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh

    r714 r715  
    827827  fi 
    828828 
    829   typeset RET DEST 
     829  typeset status DEST 
    830830 
    831831  mkdir -p ${HOME}/MIRROR/${PATHlibIGCM} 
     
    833833  echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > out_rsync 2>&1 
    834834  ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> out_rsync 2>&1 
    835   RET=$? 
    836  
    837   if [ ${RET} -gt 0 ] ; then 
     835  status=$? 
     836 
     837  if [ ${status} -gt 0 ] ; then 
    838838    echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on cesium." 
    839839    cat out_rsync 
     
    853853  fi 
    854854 
    855   typeset RET 
     855  typeset status 
    856856 
    857857  echo cp $@ > out_rsync 2>&1 
    858858  \cp $@ >> out_rsync 2>&1 
    859   RET=$? 
    860  
    861   if [ ${RET} -gt 0 ] ; then 
    862     echo "IGCM_sys_Cp : error code ${RET}" 
     859  status=$? 
     860 
     861  if [ ${status} -gt 0 ] ; then 
     862    echo "IGCM_sys_Cp : error code ${status}" 
    863863    cat out_rsync 
    864864    IGCM_debug_Exit "IGCM_sys_Cp" 
     
    880880  fi 
    881881 
    882   typeset RET 
     882  typeset status 
    883883 
    884884  echo rm $@ > out_rsync 2>&1 
    885885  \rm $@ >> out_rsync 2>&1 
    886   RET=$? 
    887  
    888   if [ ${RET} -gt 0 ] ; then 
    889     echo "IGCM_sys_Rm : error code ${RET}" 
     886  status=$? 
     887 
     888  if [ ${status} -gt 0 ] ; then 
     889    echo "IGCM_sys_Rm : error code ${status}" 
    890890    cat out_rsync 
    891891    IGCM_debug_Exit "IGCM_sys_Rm" 
     
    908908  fi 
    909909 
    910   typeset RET 
     910  typeset status 
    911911 
    912912  echo rm $@ > out_rsync 2>&1 
    913913  \rm $@ >> out_rsync 2>&1 
    914   RET=$? 
    915  
    916   if [ ${RET} -gt 0 ] ; then 
    917     echo "IGCM_sys_RmRunDir : error code ${RET}" 
     914  status=$? 
     915 
     916  if [ ${status} -gt 0 ] ; then 
     917    echo "IGCM_sys_RmRunDir : error code ${status}" 
    918918    cat out_rsync 
    919919    IGCM_debug_Exit "IGCM_sys_RmRunDir" 
     
    937937  if [ $DRYRUN = 0 ]; then 
    938938 
    939     typeset RET 
     939    typeset status 
    940940 
    941941    echo mv $@ > out_rsync 2>&1 
    942942    \mv $@ >> out_rsync 2>&1 
    943     RET=$? 
    944  
    945     if [ ${RET} -gt 0 ] ; then 
    946       echo "IGCM_sys_Mv : error code ${RET}" 
     943    status=$? 
     944 
     945    if [ ${status} -gt 0 ] ; then 
     946      echo "IGCM_sys_Mv : error code ${status}" 
    947947      cat out_rsync 
    948948      IGCM_debug_Exit "IGCM_sys_Mv" 
     
    974974    fi 
    975975 
    976     typeset RET 
     976    typeset status 
    977977 
    978978    # Only if we use rsync 
     
    981981    #USUAL WAY 
    982982    \cp -r $1 $2 > out_rsync 2>&1 
    983     RET=$? 
    984  
    985     if [ ${RET} -gt 0 ] ; then 
    986       echo "IGCM_sys_Put_Dir : error code ${RET}" 
     983    status=$? 
     984 
     985    if [ ${status} -gt 0 ] ; then 
     986      echo "IGCM_sys_Put_Dir : error code ${status}" 
    987987      cat out_rsync 
    988988      IGCM_debug_Exit "IGCM_sys_Put_Dir" 
     
    11261126    fi 
    11271127 
    1128     typeset RET 
     1128    typeset status 
    11291129    # 
    11301130    if [ X${JobType} = XRUN ] ; then 
     
    11351135    # USUAL WAY 
    11361136    \cp $1 $2 > out_rsync 2>&1 
    1137     RET=$? 
     1137    status=$? 
    11381138 
    11391139#       #RSYNC WITH NETWORK SSH CALL 
     
    11451145#       ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1 
    11461146 
    1147 #       RET=$? 
    1148 #       IGCM_sys_Rsync_out $RET 
     1147#       status=$? 
     1148#       IGCM_sys_Rsync_out $status 
    11491149 
    11501150#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync 
    1151 #       (( RET=RET+$? )) 
    1152  
    1153     if [ ${RET} -gt 0 ] ; then 
    1154       echo "IGCM_sys_Put_Rest : cp failed error code ${RET}" 
     1151#       (( status=status+$? )) 
     1152 
     1153    if [ ${status} -gt 0 ] ; then 
     1154      echo "IGCM_sys_Put_Rest : cp failed error code ${status}" 
    11551155      cat out_rsync 
    11561156      IGCM_debug_Exit "IGCM_sys_Put_Rest" 
     
    11811181    fi 
    11821182 
    1183     typeset RET 
     1183    typeset status 
    11841184    # 
    11851185    if [ X${JobType} = XRUN ] ; then 
     
    11901190    # USUAL WAY 
    11911191    \cp $1 $2 > out_rsync 2>&1 
    1192     RET=$? 
    1193  
    1194     if [ ${RET} -gt 0 ] ; then 
    1195       echo "IGCM_sys_PutBuffer_Rest : error code ${RET}" 
     1192    status=$? 
     1193 
     1194    if [ ${status} -gt 0 ] ; then 
     1195      echo "IGCM_sys_PutBuffer_Rest : error code ${status}" 
    11961196      cat out_rsync 
    11971197      IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest" 
     
    14481448 
    14491449    ccc_hsm get ${dm_liste[*]} > out_rsync 2>&1 
    1450     RET=$? 
    1451     if [ ${RET} -gt 0 ] ; then 
    1452       echo "WARNING IGCM_sys_Get : error code ${RET}" 
     1450    status=$? 
     1451    if [ ${status} -gt 0 ] ; then 
     1452      echo "WARNING IGCM_sys_Get : error code ${status}" 
    14531453      cat out_rsync 
    14541454      echo "WARNING IGCM_sys_Get : will stop later if the cp fails." 
    14551455    fi 
    14561456 
    1457     #if [ ${RET} -gt 0 ] ; then 
     1457    #if [ ${status} -gt 0 ] ; then 
    14581458    #    if [ ! "X$( grep "Lost dmusrcmd connection" out_rsync )" = "X" ] ; then 
    14591459    #   cat out_rsync 
     
    14631463    ##  dmget ${dm_liste[*]} > out_rsync 2>&1 
    14641464    #   ccc_hsm get ${dm_liste[*]} > out_rsync 2>&1 
    1465     #   RET=$? 
    1466     #   if [ ${RET} -gt 0 ] ; then 
     1465    #   status=$? 
     1466    #   if [ ${status} -gt 0 ] ; then 
    14671467    #       echo "ERROR IGCM_sys_Get : again demigration error :" 
    14681468    #       cat out_rsync 
     
    14841484        # test if the target file is present before the loop 
    14851485        IGCM_sys_TestFileArchive ${target} 
    1486         RET=$? 
    1487         if [ ${RET} -gt 0 ] ; then 
     1486        status=$? 
     1487        if [ ${status} -gt 0 ] ; then 
    14881488          echo "IGCM_sys_Get, ERROR : regular file ${target} DOES NOT EXIST ." 
    14891489          IGCM_debug_Exit "IGCM_sys_Get" 
     
    15061506    else 
    15071507      \cp ${dm_liste} ${DEST} >> out_rsync 2>&1 
    1508       RET=$? 
     1508      status=$? 
    15091509    fi 
    15101510 
     
    15171517#       ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1 
    15181518 
    1519 #       RET=$? 
    1520 #       IGCM_sys_Rsync_out $RET 
     1519#       status=$? 
     1520#       IGCM_sys_Rsync_out $status 
    15211521 
    15221522#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync 
     
    15241524 
    15251525    if [ ${RET} -gt 0 ] ; then 
    1526       echo "IGCM_sys_Get : error code ${RET}" 
     1526      echo "IGCM_sys_Get : error" 
    15271527      cat out_rsync 
     1528      \rm out_rsync 
    15281529      IGCM_debug_Exit "IGCM_sys_Get" 
    15291530    else 
     
    15441545  IGCM_debug_PushStack "IGCM_sys_GetBuffer" $@ 
    15451546 
    1546   typeset DEST RET buf_liste ifile target file_work 
     1547  typeset DEST RET status buf_liste ifile target file_work 
    15471548 
    15481549  if ( $DEBUG_sys ) ; then 
     
    15681569    else 
    15691570      \cp ${buf_liste} ${DEST} >> out_rsync 2>&1 
    1570       RET=$? 
     1571      status=$? 
    15711572    fi 
    15721573 
    15731574    if [ ${RET} -gt 0 ] ; then 
    1574       echo "IGCM_sys_GetBuffer : error code ${RET}" 
     1575      echo "IGCM_sys_GetBuffer : error" 
    15751576      cat out_rsync 
     1577      \rm out_rsync 
    15761578      IGCM_debug_Exit "IGCM_sys_GetBuffer" 
    15771579    else 
     
    16281630    echo "IGCM_sys_Dods_Rm :" $@ 
    16291631  fi 
    1630   typeset RET 
    1631   RET=0 
     1632  typeset status 
    16321633  if [ $DRYRUN = 0 ]; then 
    16331634 
     
    16391640 
    16401641    /ccc/cont003/home/dsm/p86ipsl/bin/dods_rm public/${LOGIN}/${R_DODS}/${1} # > out_dods_rm 2>&1 
    1641     RET=$? 
    1642  
    1643 #       if [ ${RET} -gt 0 ] ; then 
     1642    status=$? 
     1643 
     1644#       if [ ${status} -gt 0 ] ; then 
    16441645#           echo "IGCM_sys_Dods_Rm : error." 
    16451646#           cat out_dods_rm 
     
    16521653    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack 
    16531654  fi 
    1654   return $RET 
     1655  return $status 
    16551656} 
    16561657 
     
    16641665    echo "IGCM_sys_Dods_Cp :" $@ 
    16651666  fi 
    1666   typeset RET 
    1667   RET=0 
     1667  typeset status 
    16681668  if [ $DRYRUN = 0 ]; then 
    16691669 
     
    16751675 
    16761676    /ccc/cont003/home/dsm/p86ipsl/bin/dods_cp ${1} public/${LOGIN}/${R_DODS} # > out_dods_cp 2>&1 
    1677     RET=$? 
    1678  
    1679 #       if [ ${RET} -gt 0 ] ; then 
     1677    status=$? 
     1678 
     1679#       if [ ${status} -gt 0 ] ; then 
    16801680#           echo "IGCM_sys_Dods_Cp : error." 
    16811681#           cat out_dods_cp 
     
    16881688    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack 
    16891689  fi 
    1690   return $RET 
     1690  return $status 
    16911691} 
    16921692 
     
    17021702  fi 
    17031703  #set -vx 
    1704   typeset RET 
     1704  typeset status 
    17051705  if [ $DRYRUN = 0 ]; then 
    17061706    if ( [ ! -d ${R_SAVE}/${1} ] && [ ! -d ${R_FIGR}/${1} ] ) ; then 
     
    17281728    IGCM_sys_Dods_Rm ${1} 
    17291729    IGCM_sys_Dods_Cp ${1} 
    1730     RET=0 
    1731  
    1732     if [ ${RET} -gt 0 ] ; then 
     1730    status=0 
     1731 
     1732    if [ ${status} -gt 0 ] ; then 
    17331733      echo "IGCM_sys_Put_Dods : error." 
    17341734      IGCM_debug_Exit "IGCM_sys_Put_Dods" 
Note: See TracChangeset for help on using the changeset viewer.