Changeset 798
- Timestamp:
- 02/18/13 12:39:14 (11 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_TimeSeries_Checker
r731 r798 275 275 TestedFile=${config_UserChoices_JobName}_${ChunckDebut}_${ChunckFin}_${FlagDir}_${var}.nc 276 276 # 277 if [ -d ${DIRECTORY} ] ; then 278 Candidat=$( find ${DIRECTORY} -name "${config_UserChoices_JobName}_${ChunckDebut}_*_${FlagDir}_${var}.nc" ) 277 IGCM_sys_TestDirArchive ${DIRECTORY} 278 if [ $? = 0 ] ; then 279 Candidat=$( IGCM_sys_RshArchive "find ${DIRECTORY} -name "${config_UserChoices_JobName}_${ChunckDebut}_*_${FlagDir}_${var}.nc"" ) 279 280 else 280 281 Candidat="" -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh
r797 r798 226 226 function IGCM_sys_RshArchive { 227 227 IGCM_debug_PushStack "IGCM_sys_RshArchive" $@ 228 rsh ${STOREHOST} exec /bin/ksh <<-EOF 228 DEBUG_sys=false IGCM_sys_IsFileArchived "$@" 229 if [ $? = 0 ] ; then 230 rsh ${STOREHOST} exec /bin/ksh <<-EOF 229 231 ${@} 230 232 EOF 231 if [ $? -gt 0 ] ; then 232 echo "IGCM_sys_RshArchive : erreur." 233 status=$? 234 else 235 /bin/ksh <<-EOF 236 ${@} 237 EOF 238 status=$? 239 fi 240 if [ ${status} -gt 0 ] ; then 241 IGCM_debug_Print 2 "IGCM_sys_RshArchive : rsh or command failed error code ${status}" 233 242 IGCM_debug_Exit "IGCM_sys_RshArchive" 234 243 fi … … 344 353 fi 345 354 #- creation de repertoire sur le serveur fichier 346 IGCM_sys_IsFileArchived $1355 DEBUG_sys=false IGCM_sys_IsFileArchived $1 347 356 if [ $? = 0 ] ; then 348 357 rsh ${STOREHOST} -n mkdir -p $1 … … 468 477 typeset ExistFlag 469 478 #Command depends on targeted file system 470 IGCM_sys_IsFileArchived $1479 DEBUG_sys=false IGCM_sys_IsFileArchived $1 471 480 if [ $? = 0 ] ; then 472 481 ExistFlag=$( IGCM_sys_RshArchive "[ -d $1 ] && echo 0 || echo 1" ) … … 489 498 fi 490 499 typeset IsArchivedFlag 491 IsArchivedFlag=$( [ X$( echo $1 | grep ^\/u\/rech ) != X] && echo 0 || echo 1 )500 IsArchivedFlag=$( [ "X$( echo $1 | grep \/u\/rech )" != "X" ] && echo 0 || echo 1 ) 492 501 IGCM_debug_PopStack "IGCM_sys_IsFileArchived" 493 502 … … 504 513 typeset ExistFlag 505 514 #Command depends on targeted file system 506 IGCM_sys_IsFileArchived $1 515 #We want it quiet 516 DEBUG_sys=false IGCM_sys_IsFileArchived $1 507 517 if [ $? = 0 ] ; then 508 518 ExistFlag=$( IGCM_sys_RshArchive "[ -f $1 ] && echo 0 || echo 1" ) … … 537 547 IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@ 538 548 #Command depends on targeted file system 539 IGCM_sys_IsFileArchived $1549 DEBUG_sys=false IGCM_sys_IsFileArchived $1 540 550 if [ $? = 0 ] ; then 541 551 IGCM_sys_RshArchive "ls ${@} 2>/dev/null | wc -l" … … 947 957 # 948 958 #Command depends on targeted file system 949 IGCM_sys_IsFileArchived $2959 DEBUG_sys=false IGCM_sys_IsFileArchived $2 950 960 if [ $? = 0 ] ; then 951 961 \rcp -r $1 ${STOREHOST}:$2 > out_rsync 2>&1 … … 996 1006 # 997 1007 # Command depends on targeted filesystem 998 IGCM_sys_IsFileArchived $11008 DEBUG_sys=false IGCM_sys_IsFileArchived $1 999 1009 if [ $? = 0 ] ; then 1000 1010 # add dmget (to demigrate all offline files) to reduce time of this command : … … 1118 1128 # 1119 1129 #Command depends on targeted file system 1120 IGCM_sys_IsFileArchived $21130 DEBUG_sys=false IGCM_sys_IsFileArchived $2 1121 1131 if [ $? = 0 ] ; then 1122 1132 mfput $1 $2 > out_rsync 2>&1 … … 1228 1238 # 1229 1239 #Command depends on targeted file system 1230 IGCM_sys_IsFileArchived $21240 DEBUG_sys=false IGCM_sys_IsFileArchived $2 1231 1241 if [ $? = 0 ] ; then 1232 1242 mfput $1 $2 > out_rsync 2>&1 … … 1380 1390 1381 1391 # test if the (first) file is present in the old computation : 1382 IGCM_sys_IsFileArchived ${dm_liste[0]}1392 DEBUG_sys=false IGCM_sys_IsFileArchived ${dm_liste[0]} 1383 1393 if [ $? = 0 ] ; then 1384 1394 IGCM_sys_TestFileArchive ${dm_liste[0]} 1385 1395 status=$? 1386 1396 else 1387 IGCM_sys_TestFile ${dm_liste[0]}1397 IGCM_sys_TestFileBuffer ${dm_liste[0]} 1388 1398 status=$? 1389 1399 fi … … 1396 1406 1397 1407 #Command depends on targeted file system 1398 IGCM_sys_IsFileArchived ${dm_liste[0]}1408 DEBUG_sys=false IGCM_sys_IsFileArchived ${dm_liste[0]} 1399 1409 if [ $? = 0 ] ; then 1400 1410 mfget ${dm_liste[*]} ${DEST} > out_rsync 2>&1
Note: See TracChangeset
for help on using the changeset viewer.