mirror of https://github.com/tLDP/LDP
Generating setenv.python
This commit is contained in:
parent
25cb56e5fe
commit
ccacc8b69f
|
@ -359,20 +359,23 @@ patch_setenv_sh()
|
|||
create_setenv_csh()
|
||||
{
|
||||
local input=$1
|
||||
local output=$2
|
||||
local prefix='^[[:space:]]*export[[:space:]]\{1,\}'
|
||||
local csh=$2
|
||||
local conf=$3
|
||||
|
||||
echo -n "Generating ${output} ... "
|
||||
(
|
||||
echo "# Generated by configure. Do not modify."
|
||||
echo ""
|
||||
sed -ne "s/${prefix}\([[:alnum:]_]\{1,\}\)=.*/\1/p" \
|
||||
< ${input} \
|
||||
| while read var
|
||||
do
|
||||
echo "setenv ${var} \"${!var}\""
|
||||
done
|
||||
) > ${output}
|
||||
local prefix='^[[:space:]]*export[[:space:]]\{1,\}'
|
||||
local header="# Generated by configure. Do not modify.\n"
|
||||
|
||||
echo -n "Generating ${csh} and ${conf} ... "
|
||||
|
||||
echo "$header" > ${csh}
|
||||
echo "$header" > ${conf}
|
||||
sed -ne "s/${prefix}\([[:alnum:]_]\{1,\}\)=.*/\1/p" \
|
||||
< ${input} \
|
||||
| while read var
|
||||
do
|
||||
echo "setenv ${var} \"${!var}\"" >> ${csh}
|
||||
echo "PythonOption ${var} \"${!var}\"" >> ${conf}
|
||||
done
|
||||
|
||||
echo "Ok."
|
||||
return 0
|
||||
|
@ -436,5 +439,6 @@ fi
|
|||
echo "No errors."
|
||||
patch_xsl || 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
|
||||
|
|
Loading…
Reference in New Issue