configure.in: escape
* configure.in (unexpand_shvar): escape $. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
262529fdfb
commit
4425e21343
@ -3518,13 +3518,13 @@ unexpand_shvar() {
|
|||||||
test "$#" -eq 0 && return
|
test "$#" -eq 0 && return
|
||||||
for n do
|
for n do
|
||||||
eval v='"$'$n'"'
|
eval v='"$'$n'"'
|
||||||
v="`echo \"$v\" | sed -e ['s/${[^${}\"]*}/\"&\"/g'] -e ['s/[][$|.\\?*]/\\\\&/g']`"
|
v="`echo \"$v\" | sed -e ['s/\${[^${}\"]*}/\"&\"/g'] -e ['s/[][$|.\\?*]/\\\\&/g']`"
|
||||||
if test -n "$v"; then
|
if test -n "$v"; then
|
||||||
expr=["${expr};s|"'\("[^$"]*\)'"$v|\\1\${$n}\"|g"]
|
expr=["${expr};s|"'\("[^$"]*\)'"$v|\\1\${$n}\"|g"]
|
||||||
AS_CASE(["$v"], [*'${'*'}'*], [expr=["$expr;s|$v|\"\${$n}\"|g"]])
|
AS_CASE(["$v"], [*'${'*'}'*], [expr=["$expr;s|$v|\"\${$n}\"|g"]])
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
expr=['s/${[^${}"]*}/"&"/g;'"${expr};"'s/"\(\${[^${}"]*}\)"/\1/g']
|
expr=['s/\${[^${}"]*}/"&"/g;'"${expr};"'s/"\(\${[^${}"]*}\)"/\1/g']
|
||||||
eval $var='"`echo \"\\\"${'$var'}\\\"\" | sed \"$expr;s/\\\"//g\"`"'
|
eval $var='"`echo \"\\\"${'$var'}\\\"\" | sed \"$expr;s/\\\"//g\"`"'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user