Generating setenv.python

This commit is contained in:
alba 2002-08-04 22:09:11 +00:00
parent 25cb56e5fe
commit ccacc8b69f
1 changed files with 18 additions and 14 deletions

View File

@ -359,20 +359,23 @@ patch_setenv_sh()
create_setenv_csh() create_setenv_csh()
{ {
local input=$1 local input=$1
local output=$2 local csh=$2
local prefix='^[[:space:]]*export[[:space:]]\{1,\}' local conf=$3
echo -n "Generating ${output} ... " local prefix='^[[:space:]]*export[[:space:]]\{1,\}'
( local header="# Generated by configure. Do not modify.\n"
echo "# Generated by configure. Do not modify."
echo "" echo -n "Generating ${csh} and ${conf} ... "
sed -ne "s/${prefix}\([[:alnum:]_]\{1,\}\)=.*/\1/p" \
< ${input} \ echo "$header" > ${csh}
| while read var echo "$header" > ${conf}
do sed -ne "s/${prefix}\([[:alnum:]_]\{1,\}\)=.*/\1/p" \
echo "setenv ${var} \"${!var}\"" < ${input} \
done | while read var
) > ${output} do
echo "setenv ${var} \"${!var}\"" >> ${csh}
echo "PythonOption ${var} \"${!var}\"" >> ${conf}
done
echo "Ok." echo "Ok."
return 0 return 0
@ -436,5 +439,6 @@ fi
echo "No errors." echo "No errors."
patch_xsl || exit -1 patch_xsl || exit -1
patch_setenv_sh bin/setenv.sh || exit -1 patch_setenv_sh bin/setenv.sh || exit -1
create_setenv_csh bin/setenv.sh bin/setenv.csh || exit -1 create_setenv_csh bin/setenv.sh bin/setenv.csh bin/setenv.python \
|| exit -1
patch_http_conf conf/*.conf || exit -1 patch_http_conf conf/*.conf || exit -1