Ignore:
Timestamp:
02/03/15 12:22:08 (9 years ago)
Author:
sdipsl
Message:

the metrics template need more information
create IGCM_comp_modifyFile function to simply replace pattern in files
code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh

    r1165 r1166  
    950950} 
    951951 
     952 
     953 
     954#======================================================================= 
     955function IGCM_comp_modifyFile 
     956{ 
     957# 
     958# syntax:     IGCM_comp_modifyFile  filein  key  [value] 
     959# 
     960# For example : IGCM_comp_modifyFile metrics_template.py case_id \'SE_${YEARS}\' 
     961# 
     962# This function is used to replace a pattern in a file for a specific variable. 
     963# 
     964# Arguments: 
     965# - filein : the file in run directory in which the variable should be set 
     966# - key    : the variable to modify 
     967# - value  : the value to set the key equal to 
     968# 
     969  IGCM_debug_PushStack "IGCM_comp_modifyFile" 
     970 
     971  typeset filein key value pattern 
     972 
     973  # Set local variables and test the arguments 
     974  if [ $# = 3 ] ; then 
     975    # Normal case with 3 arguments 
     976    filein=$1 ; key=$2 ; value=$3 
     977  else 
     978    IGCM_debug_Exit "IGCM_comp_modifyFile: Bad number of arguments." 
     979    IGCM_debug_PopStack "IGCM_comp_modifyFile" 
     980    return 
     981  fi 
     982  IGCM_debug_Print 1 "Entering IGCM_comp_modifyFile with arguments: ${filein} ${key} ${value}" 
     983 
     984  # Test if the file exist 
     985  if [ ! -f ${filein} ] ; then 
     986    IGCM_debug_Exit "IGCM_comp_modifyFile: ${filein} does not exist." 
     987    IGCM_debug_PopStack "IGCM_comp_modifyFile" 
     988    return 
     989  fi 
     990 
     991  # Read the line with key in the file without the comments 
     992  pattern=$( grep "^ *${key} *=" ${filein} | sed -e "s% *\!.*%%" ) 
     993 
     994  # Verify the existance of the pattern 
     995  if [ X"${pattern}" = X ] ; then 
     996    # Variable key is not set in filein, stop. 
     997    IGCM_debug_Exit "IGCM_comp_modifyFile : Variable ${key} is not set in correct file. It should be set in ${filein}." 
     998    IGCM_debug_PopStack "IGCM_comp_modifyFile" 
     999    return 
     1000  fi 
     1001 
     1002  # Now change key in filein 
     1003  sed -e "s:${pattern}:${key}=${value}:" ${filein} > ${filein}.tmp 
     1004  IGCM_debug_Print 1 "IGCM_comp_modifyFile: In ${filein} set ${key}=${value}" 
     1005  \mv ${filein}.tmp ${filein} 
     1006   
     1007  IGCM_debug_PopStack "IGCM_comp_modifyFile" 
     1008} 
     1009 
    9521010#======================================================================= 
    9531011function IGCM_comp_modifyDefFile 
     
    9771035  IGCM_debug_PushStack "IGCM_comp_modifyDefFile" 
    9781036 
     1037  typeset type filein key value 
     1038  typeset filelist nb_occ modify 
     1039 
    9791040  # Set local variables and test the arguments 
    9801041  if [ $# = 4 ] ; then 
     
    9891050    return 
    9901051  fi 
    991   IGCM_debug_Print 1 "Entering IGCM_comp_modifyDefFile with arguments: $type $filein $key $value" 
     1052  IGCM_debug_Print 1 "Entering IGCM_comp_modifyDefFile with arguments: ${type} ${filein} ${key} ${value}" 
    9921053 
    9931054  # Test if first argument is correct 
    994   if [ $type != blocker ] && [ $type != nonblocker ] && [ $type != force ] ; then 
     1055  if [ ${type} != blocker ] && [ ${type} != nonblocker ] && [ ${type} != force ] ; then 
    9951056    IGCM_debug_Exit "IGCM_comp_modifyDefFile: Error in first argument must be blocker, nonblocker or force" 
    9961057    IGCM_debug_PopStack "IGCM_comp_modifyDefFile" 
     
    10001061  # Test if the file exist 
    10011062  if [ ! -f ${filein} ] ; then 
    1002     IGCM_debug_Exit "IGCM_comp_modifyDefFile: $filein does not exist." 
     1063    IGCM_debug_Exit "IGCM_comp_modifyDefFile: ${filein} does not exist." 
    10031064    IGCM_debug_PopStack "IGCM_comp_modifyDefFile" 
    10041065    return 
     
    10091070 
    10101071  # Count number of occurances for the key in all files 
    1011   nb_occ=$( grep -w $key $filelist |grep -v "#"  |wc -l ) 
     1072  nb_occ=$( grep -w ${key} ${filelist} | grep -v "#"  | wc -l ) 
    10121073 
    10131074  # Test if key is set several times 
    1014   if [ $nb_occ -gt 1 ] ; then 
    1015     IGCM_debug_Exit "IGCM_comp_modifyDefFile : Error in $filein: Variable=$key is set ${nb_occ} times" 
     1075  if [ ${nb_occ} -gt 1 ] ; then 
     1076    IGCM_debug_Exit "IGCM_comp_modifyDefFile : Error in ${filein}: Variable=${key} is set ${nb_occ} times" 
    10161077    IGCM_debug_PopStack "IGCM_comp_modifyDefFile" 
    10171078    return 
     
    10191080 
    10201081  # Treatement according to different cases 
    1021   if [ $nb_occ -eq 0 ] && [ $type = blocker ] ; then 
     1082  if [ ${nb_occ} -eq 0 ] && [ ${type} = blocker ] ; then 
    10221083    # Stop if the key is never set and the function is blocker 
    1023     IGCM_debug_Exit "IGCM_comp_modifyDefFile : Error in $filein: Variable=$key has been removed but this function is blocker. " 
    1024     IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: restore $filein for variable $key." 
    1025   elif [ $nb_occ -eq 0 ] && [ $type = nonblocker ] ; then 
     1084    IGCM_debug_Exit "IGCM_comp_modifyDefFile : Error in ${filein}: Variable=${key} has been removed but this function is blocker. " 
     1085    IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: restore ${filein} for variable ${key}." 
     1086  elif [ ${nb_occ} -eq 0 ] && [ ${type} = nonblocker ] ; then 
    10261087    # The key is not set but it is a nonblocker call so nothing is done. 
    1027     IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: $key is not set in $filein. This is a nonblocker call so nothing is done." 
    1028     IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: Default value for $key from the model will be used." 
     1088    IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: ${key} is not set in ${filein}. This is a nonblocker call so nothing is done." 
     1089    IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: Default value for ${key} from the model will be used." 
    10291090    modify=no 
    1030   elif [ $( grep $key $filein | grep -v "\#"  |wc -l ) = 0 ] ; then 
     1091  elif [ $( grep ${key} ${filein} | grep -v "\#"  |wc -l ) = 0 ] ; then 
    10311092    # Variable key is not set in filein, stop. 
    1032     IGCM_debug_Exit "IGCM_comp_modifyDefFile : Variable $key is not set in correct file. It should be set in $filein." 
     1093    IGCM_debug_Exit "IGCM_comp_modifyDefFile : Variable ${key} is not set in correct file. It should be set in ${filein}." 
    10331094  fi 
    10341095 
    10351096  # Check if AUTO is set in the filein on the same line as the key variable 
    1036   if [ $( grep -w $key $filein | grep -v "\#" | grep AUTO | wc -l ) = 1 ] ; then 
     1097  if [ $( grep -w ${key} ${filein} | grep -v "\#" | grep AUTO | wc -l ) = 1 ] ; then 
    10371098    # Modification will be done for all cases 
    10381099    modify=yes 
    10391100  else 
    10401101    # The variable was not set to AUTO 
    1041     if [ $type = blocker ] ; then 
     1102    if [ ${type} = blocker ] ; then 
    10421103      # Exit because this is a blocker call 
    1043       IGCM_debug_Exit "IGCM_comp_modifyDefFile : The variable $key cannot be modified. It should be set to AUTO." 
     1104      IGCM_debug_Exit "IGCM_comp_modifyDefFile : The variable ${key} cannot be modified. It should be set to AUTO." 
    10441105      return 
    1045     elif [ $type = nonblocker ] ; then 
     1106    elif [ ${type} = nonblocker ] ; then 
    10461107      # Do nothing. Suppose that the user did set the variable correct 
    1047       IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: $key is set by the user. Nothing done." 
     1108      IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: ${key} is set by the user. Nothing done." 
    10481109      modify=no 
    1049     elif [ $type = force ] ; then 
     1110    elif [ ${type} = force ] ; then 
    10501111      # Force modification 
    1051       IGCM_debug_Print 1 "IGCM_comp_modifyDefFile : Variabl=$key was not set to AUTO. Modification will be forced." 
     1112      IGCM_debug_Print 1 "IGCM_comp_modifyDefFile : Variabl=${key} was not set to AUTO. Modification will be forced." 
    10521113      modify=yes 
    10531114    fi 
     
    10551116 
    10561117  # Do the modifcation now 
    1057   if [ $modify = yes ] ; then 
     1118  if [ ${modify} = yes ] ; then 
    10581119 
    10591120    # For option DEFAULT, read default value from file. 
    1060     if [ X"$value" = XDEFAULT ] || [ X"$value" = X ] ; then 
     1121    if [ X"${value}" = XDEFAULT ] || [ X"${value}" = X ] ; then 
    10611122      # Case to set DEFAULT value 
    10621123      # Read default value from filein 
    1063       value=$( grep $key $filein | grep -v "\#" | awk  -F"DEFAULT *=" '{print $2}') 
    1064  
    1065       if [ X"$value" = X ] ; then 
    1066         IGCM_debug_Exit "IGCM_comp_modifyDefFile : The variable $key needs a DEFAULT value in $filein." 
    1067         IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: The syntax in $filein should be:" 
    1068         IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: $key=_AUTO_:DEFAULT=def_value" 
     1124      value=$( grep ${key} ${filein} | grep -v "\#" | awk  -F"DEFAULT *=" '{print $2}') 
     1125 
     1126      if [ X"${value}" = X ] ; then 
     1127        IGCM_debug_Exit "IGCM_comp_modifyDefFile : The variable ${key} needs a DEFAULT value in ${filein}." 
     1128        IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: The syntax in ${filein} should be:" 
     1129        IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: ${key}=_AUTO_:DEFAULT=def_value" 
    10691130        IGCM_debug_PopStack "IGCM_comp_modifyDefFile" 
    10701131        return 
     
    10731134 
    10741135    # Now change key in filein 
    1075     sed -e "s/^${key}\ *=.*/${key}= ${value}/" $filein > $filein.tmp 
    1076     IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: In $filein set $key=$value" 
    1077     \mv $filein.tmp $filein 
     1136    sed -e "s/^${key}\ *=.*/${key}= ${value}/" ${filein} > ${filein}.tmp 
     1137    IGCM_debug_Print 1 "IGCM_comp_modifyDefFile: In ${filein} set ${key}=${value}" 
     1138    \mv ${filein}.tmp ${filein} 
    10781139  fi 
    10791140  IGCM_debug_PopStack "IGCM_comp_modifyDefFile" 
     
    11071168  IGCM_debug_PushStack "IGCM_comp_modifyNamelist" 
    11081169 
     1170  typeset type filein key value pattern modify 
     1171 
    11091172  # Set local variables and test the arguments 
    11101173  if [ $# = 4 ] ; then 
     
    11191182    return 
    11201183  fi 
    1121   IGCM_debug_Print 1 "Entering IGCM_comp_modifyNamelist with arguments: $type $filein $key $value" 
     1184  IGCM_debug_Print 1 "Entering IGCM_comp_modifyNamelist with arguments: ${type} ${filein} ${key} ${value}" 
    11221185 
    11231186  # Test if first argument is correct 
    1124   if [ $type != blocker ] && [ $type != nonblocker ] && [ $type != force ] ; then 
     1187  if [ ${type} != blocker ] && [ ${type} != nonblocker ] && [ ${type} != force ] ; then 
    11251188    IGCM_debug_Exit "IGCM_comp_modifyNamelist: Error in first argument must be blocker, nonblocker or force" 
    11261189    IGCM_debug_PopStack "IGCM_comp_modifyNamelist" 
     
    11301193  # Test if the file exist 
    11311194  if [ ! -f ${filein} ] ; then 
    1132     IGCM_debug_Exit "IGCM_comp_modifyNamelist: $filein does not exist." 
     1195    IGCM_debug_Exit "IGCM_comp_modifyNamelist: ${filein} does not exist." 
    11331196    IGCM_debug_PopStack "IGCM_comp_modifyNamelist" 
    11341197    return 
     
    11361199 
    11371200  # Read the line with key in the file without the comments 
    1138   pattern=$( grep "^ *$key *=" $filein | sed -e "s% *\!.*%%" ) 
     1201  pattern=$( grep "^ *${key} *=" ${filein} | sed -e "s% *\!.*%%" ) 
    11391202 
    11401203  # Verify the existance of the pattern 
    11411204  if [ X"$pattern" = X ] ; then 
    11421205    # Variable key is not set in filein, stop. 
    1143     IGCM_debug_Exit "IGCM_comp_modifyNamelist : Variable $key is not set in correct file. It should be set in $filein." 
     1206    IGCM_debug_Exit "IGCM_comp_modifyNamelist : Variable ${key} is not set in correct file. It should be set in ${filein}." 
    11441207    IGCM_debug_PopStack "IGCM_comp_modifyNamelist" 
    11451208    return 
     
    11521215  else 
    11531216    # The variable was not set to AUTO 
    1154     if [ $type = blocker ] ; then 
     1217    if [ ${type} = blocker ] ; then 
    11551218      # Exit because this is a blocker call 
    1156       IGCM_debug_Exit "IGCM_comp_modifyNamelist : The variable $key cannot be modified. It should be set to AUTO." 
     1219      IGCM_debug_Exit "IGCM_comp_modifyNamelist : The variable ${key} cannot be modified. It should be set to AUTO." 
    11571220      IGCM_debug_PopStack "IGCM_comp_modifyNamelist" 
    11581221      return 
    1159     elif [ $type = nonblocker ] ; then 
     1222    elif [ ${type} = nonblocker ] ; then 
    11601223      # Do nothing. Suppose that the user did set the variable correct 
    1161       IGCM_debug_Print 1 "IGCM_comp_modifyNamelist: $key is set by the user. Nothing done." 
     1224      IGCM_debug_Print 1 "IGCM_comp_modifyNamelist: ${key} is set by the user. Nothing done." 
    11621225      modify=no 
    1163     elif [ $type = force ] ; then 
     1226    elif [ ${type} = force ] ; then 
    11641227      # Force modification 
    1165       IGCM_debug_Print 1 "IGCM_comp_modifyNamelist : Variabl=$key was not set to AUTO. Modification will be forced." 
     1228      IGCM_debug_Print 1 "IGCM_comp_modifyNamelist : Variabl=${key} was not set to AUTO. Modification will be forced." 
    11661229      modify=yes 
    11671230    fi 
     
    11691232 
    11701233  # Do the modifcation now 
    1171   if [ $modify = yes ] ; then 
     1234  if [ ${modify} = yes ] ; then 
    11721235 
    11731236    # For option DEFAULT, read default value from file. 
    1174     if [ X"$value" = XDEFAULT ] || [ X"$value" = X ] ; then 
     1237    if [ X"${value}" = XDEFAULT ] || [ X"${value}" = X ] ; then 
    11751238      # Case to set DEFAULT value 
    11761239      # Read default value from filein 
    11771240      value=$( echo $pattern | awk  -F"DEFAULT *=" '{print $2}') 
    11781241 
    1179       if [ X"$value" = X ] ; then 
    1180         IGCM_debug_Exit "IGCM_comp_modifyNamelist : The variable $key needs a DEFAULT value in $filein." 
    1181         IGCM_debug_Print 1 "IGCM_comp_modifyNamelist: The syntax in $filein should be:" 
    1182         IGCM_debug_Print 1 "IGCM_comp_modifyNamelist: $key=_AUTO_:DEFAULT=def_value" 
     1242      if [ X"${value}" = X ] ; then 
     1243        IGCM_debug_Exit "IGCM_comp_modifyNamelist : The variable ${key} needs a DEFAULT value in ${filein}." 
     1244        IGCM_debug_Print 1 "IGCM_comp_modifyNamelist: The syntax in ${filein} should be:" 
     1245        IGCM_debug_Print 1 "IGCM_comp_modifyNamelist: ${key}=_AUTO_:DEFAULT=def_value" 
    11831246        IGCM_debug_PopStack "IGCM_comp_modifyNamelist" 
    11841247        return 
     
    11871250 
    11881251    # Now change key in filein 
    1189     sed -e "s/${pattern}/       $key=${value}/" $filein > $filein.tmp 
    1190     IGCM_debug_Print 1 "IGCM_comp_modifyNamelist: In $filein set $key=$value" 
    1191     \mv $filein.tmp $filein 
     1252    sed -e "s/${pattern}/       ${key}=${value}/" ${filein} > ${filein}.tmp 
     1253    IGCM_debug_Print 1 "IGCM_comp_modifyNamelist: In ${filein} set ${key}=${value}" 
     1254    \mv ${filein}.tmp ${filein} 
    11921255  fi 
    11931256  IGCM_debug_PopStack "IGCM_comp_modifyNamelist" 
     
    12211284  IGCM_debug_PushStack "IGCM_comp_modifyXmlFile" 
    12221285 
     1286  typeset type filein keyid keyattrib value modify 
     1287 
    12231288  # Set local variables and test the arguments 
    12241289  if [ $# = 5 ] ; then 
     
    12301295    return 
    12311296  fi 
    1232   IGCM_debug_Print 1 "Entering IGCM_comp_modifyXmlFile with arguments: type=$type file=$filein, id=$keyid attribute=$keyattrib, value=$value" 
     1297  IGCM_debug_Print 1 "Entering IGCM_comp_modifyXmlFile with arguments: type=${type} file=${filein}, id=${keyid} attribute=${keyattrib}, value=${value}" 
    12331298 
    12341299  # Test if first argument is correct 
    1235   if [ $type != blocker ] && [ $type != nonblocker ] && [ $type != force ] ; then 
     1300  if [ ${type} != blocker ] && [ ${type} != nonblocker ] && [ ${type} != force ] ; then 
    12361301    IGCM_debug_Exit "IGCM_comp_modifyXmlFile: Error in first argument must be blocker, nonblocker or force" 
    12371302    IGCM_debug_PopStack "IGCM_comp_modifyXmlFile" 
     
    12411306  # Test if the file exist 
    12421307  if [ ! -f ${filein} ] ; then 
    1243     IGCM_debug_Exit "IGCM_comp_modifyXmlFile: $filein does not exist." 
     1308    IGCM_debug_Exit "IGCM_comp_modifyXmlFile: ${filein} does not exist." 
    12441309    IGCM_debug_PopStack "IGCM_comp_modifyXmlFile" 
    12451310    return 
     
    12471312 
    12481313  # Test if keyid is set in filein, otherwise exit 
    1249   if [ $( grep -w $keyid $filein | wc -l ) = 0 ] ; then 
     1314  if [ $( grep -w ${keyid} ${filein} | wc -l ) = 0 ] ; then 
    12501315    # Variable key is not set in filein, stop. 
    1251     IGCM_debug_Exit "IGCM_comp_modifyXmlFile : $keyid is not set in the file. Bad syntax of $filein file." 
     1316    IGCM_debug_Exit "IGCM_comp_modifyXmlFile : ${keyid} is not set in the file. Bad syntax of ${filein} file." 
    12521317    IGCM_debug_PopStack "IGCM_comp_modifyXmlFile" 
    12531318    return 
     
    12551320 
    12561321  # Check if AUTO is set on the same line as keyid and keyattrib 
    1257   if [  $( grep -w $keyid $filein | grep AUTO | wc -l ) = 1 ] ; then 
     1322  if [  $( grep -w ${keyid} ${filein} | grep AUTO | wc -l ) = 1 ] ; then 
    12581323    # Modifification will be done 
    12591324    modify=yes 
    12601325  else 
    1261     if [ $type = blocker ] ; then 
     1326    if [ ${type} = blocker ] ; then 
    12621327      # Exit, the variable must be set to AUTO 
    1263       IGCM_debug_Exit "IGCM_comp_modifyXmlFile : blocker function. The $keyattrib for $keyid must be set to AUTO in $filein." 
     1328      IGCM_debug_Exit "IGCM_comp_modifyXmlFile : blocker function. The ${keyattrib} for ${keyid} must be set to AUTO in ${filein}." 
    12641329      IGCM_debug_PopStack "IGCM_comp_modifyXmlFile" 
    12651330      return 
    1266     elif [ $type = nonblocker ] ; then 
     1331    elif [ ${type} = nonblocker ] ; then 
    12671332      # Nothing will be done 
    12681333      IGCM_debug_Print 1 "Nonblocker nothing is done for ${filein}, id=${keyid} and attribute ${keyattrib}" 
    12691334      modify=no 
    1270     elif [ $type = force ] ; then 
     1335    elif [ ${type} = force ] ; then 
    12711336      # Force modification 
    1272       IGCM_debug_Print 1 "IGCM_comp_modifyXmlFile : Attribute=$keyattrib for id=$keyid was not set to AUTO. Modification will be forced." 
     1337      IGCM_debug_Print 1 "IGCM_comp_modifyXmlFile : Attribute=${keyattrib} for id=${keyid} was not set to AUTO. Modification will be forced." 
    12731338      modify=yes 
    12741339    fi 
     
    12761341 
    12771342  # Do the modifcation now 
    1278   if [ $modify = yes ] ; then 
    1279     if [ $keyattrib = NONE ] ; then 
     1343  if [ ${modify} = yes ] ; then 
     1344    if [ ${keyattrib} = NONE ] ; then 
    12801345      # Case to modify the variable itself 
    12811346      IGCM_debug_Print 1 "Now modify ${filein} for id=${keyid} by setting the variable=${value}" 
    1282       sed -e "s/\(<[^\"]*\"${keyid}\".*>\)\([^<]*\)\(<[^>]*\)/\1${value}\3/" $filein > $filein.tmp 
     1347      sed -e "s/\(<[^\"]*\"${keyid}\".*>\)\([^<]*\)\(<[^>]*\)/\1${value}\3/" ${filein} > ${filein}.tmp 
    12831348    else 
    12841349      # Check if keyattrib is set on the same line as keyid 
    1285       if [  $( grep -w $keyid $filein | grep $keyattrib | wc -l ) = 1 ] ; then 
     1350      if [  $( grep -w ${keyid} ${filein} | grep ${keyattrib} | wc -l ) = 1 ] ; then 
    12861351        # Case to modify the attribute value 
    12871352        IGCM_debug_Print 1 "Now modify ${filein} for id=${keyid} by setting attribute to ${keyattrib}=${value}" 
    1288         sed -e "/id=\"${keyid}\"/s/\(${keyattrib}=\"\)[^\"]*\(\"\)/\1${value}\2/" $filein > $filein.tmp 
     1353        sed -e "/id=\"${keyid}\"/s/\(${keyattrib}=\"\)[^\"]*\(\"\)/\1${value}\2/" ${filein} > ${filein}.tmp 
    12891354      else 
    12901355        # Case to add the attribute and its value 
    12911356        IGCM_debug_Print 1 "Now add in ${filein} for id=${keyid} the attribute ${keyattrib} to the value ${value}" 
    1292         sed -e "/id=\"${keyid}\"/s/\/>/ ${keyattrib}=\"${value}\"\/>/" $filein > $filein.tmp 
     1357        sed -e "/id=\"${keyid}\"/s/\/>/ ${keyattrib}=\"${value}\"\/>/" ${filein} > ${filein}.tmp 
    12931358      fi 
    12941359    fi 
    1295     \mv $filein.tmp $filein 
     1360    \mv ${filein}.tmp ${filein} 
    12961361  fi 
    12971362  IGCM_debug_PopStack "IGCM_comp_modifyXmlFile" 
     
    16931758  # Append the sync call and the copy sequence to the IGCM_FlushRebuild function if needed 
    16941759  if [ ${#rebuildedActionsList[*]} -ne 0 ] ; then 
    1695     echo "IGCM_sys_sync         " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
     1760    echo "IGCM_sys_sync              " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
    16961761    i=0 
    16971762    until [ ${i} -ge ${#rebuildedActionsList[*]} ]; do 
Note: See TracChangeset for help on using the changeset viewer.