From: vsr Date: Wed, 26 Jan 2005 10:21:12 +0000 (+0000) Subject: Fix bug KERNEL7695 : correct 'setenva', 'setenvp' commands in order to not permute... X-Git-Tag: SALOME_V_2_2_0~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2671e6ffd504cd6d01c7f3342a3ea46e073d1aad;p=tools%2Finstall.git Fix bug KERNEL7695 : correct 'setenva', 'setenvp' commands in order to not permute the original order of the directories in environment variables. --- diff --git a/config_files/common.sh b/config_files/common.sh index feca5a1..b91ad0e 100755 --- a/config_files/common.sh +++ b/config_files/common.sh @@ -94,13 +94,13 @@ export INSTALL_ROOT=${install_root} #$DELIM globals $DELIM setenvp() { xenv=\$2:\`printenv \$1\` - out_var=\`echo \$xenv | awk -F: '{n=0 ; for(i=1;i<=NF;i++){v=\$i;t=1;for(j=0;j<=n;j++){if(keys[j]==v){t=0;break;}};if(t)keys[n++]=v} ; for(j=0;j=1;i--){v=\$i;t=1;for(j=0;j<=n;j++){if(keys[j]==v){t=0;break;}};if(t)keys[n++]=v} ; for(j=n-1;j>=0;j--){printf "%s",keys[j];if(j>0) printf ":"} ; printf "\n"}'\` + xenv=\$2:\`printenv \$1\` + out_var=\`echo \$xenv | awk -F: '{ n=0; r=1; s=\$1; x=0; for( i=2; i<=NF; i++ ){ v=\$i; t=1; if( v==s ) r=0; for( j=0; j<=n; j++ ){ if( keys[j]==v ){ t=0; break; } }; if( t ) keys[n++]=v; x=1; }; for( j=0; j> ${install_work}/$CSHRC <=1;i--){v=\$i;t=1;for(j=0;j<=n;j++){if(keys[j]==v){t=0;break;}};if(t)keys[n++]=v} ; for(j=n-1;j>=0;j--){printf "%s",keys[j];if(j>0) printf ":"} ; printf "\n"}'"'" +alias cleandup "echo \!:1 | awk -F: '"'{ n=0; r=1; s=\$1; x=0; for( i=2; i<=NF; i++ ){ v=\$i; t=1; if( v==s ) r=0; for( j=0; j<=n; j++ ){ if( keys[j]==v ){ t=0; break; } }; if( t ) keys[n++]=v; x=1; }; if( r ) printf "%s",s; if( x ) printf ":"; for( j=0; j set inital variables pre_vars="PATH LD_LIBRARY_PATH LD_RUN_PATH PYTHONPATH"