From: vsr Date: Fri, 29 Sep 2006 13:42:20 +0000 (+0000) Subject: Fix pb on some platform with awk: limited sprintf() function buffer size X-Git-Tag: V_3_2_2_before64bit~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fd2c6abab9006da2bdd289ef649997b3d736820a;p=tools%2Finstall.git Fix pb on some platform with awk: limited sprintf() function buffer size --- diff --git a/config_files/common.sh b/config_files/common.sh index 2f33ae8..b4b5bb8 100755 --- a/config_files/common.sh +++ b/config_files/common.sh @@ -155,33 +155,45 @@ cat >> ${install_work}/_$SHRC <") nb = split("",b,":"); \\ - else nb = split(\$1,b,":"); \\ - s = "" ; \\ - for(i=1;i<=nb;i++) { \\ - if(!(b[i] in ccc)) { \\ - if(length(s)!=0) \\ - s = sprintf("%s:",s); \\ - s = sprintf("%s%s",s,b[i]); \\ - ccc[b[i]]; \\ - }; \\ - }; \\ - s1 = ""; \\ - for(i=1;i<=na;i++) { \\ - if(!(a[i] in ccc)) { \\ - if(length(s1)!=0) \\ - s1 = sprintf("%s:",s1); \\ - s1 = sprintf("%s%s",s1,a[i]); \\ - ccc[a[i]]; \\ - }; \\ - }; \\ - if(dir) \\ - s = length(s) == 0 ? s1 : sprintf("%s:%s",s1,s); \\ - else \\ - s = length(s1) == 0 ? s : sprintf("%s:%s",s,s1); \\ - printf("%s\n",s); \\ - }'\` + na = split(\$2,a,":"); \\ + k1=0; \\ + bbb[k1++]=""; \\ + ccc[""]; \\ + if(\$1 != "") { \\ + nb = split(\$1,b,":"); \\ + for(i=1;i<=nb;i++) { \\ + if(!(b[i] in ccc) ) { \\ + ccc[b[i]]; \\ + bbb[k1++]=b[i]; \\ + }; \\ + }; \\ + }; \\ + k2=0; \\ + aaa[k2++]=""; \\ + for(i=1;i<=na;i++) { \\ + if(!(a[i] in ccc)) { \\ + ccc[a[i]]; \\ + aaa[k2++]=a[i]; \\ + }; \\ + }; \\ + ORS=":"; \\ + if(dir) { \\ + for(i=1;i> ${install_work}/_$CSHRC <