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:
nobu 2013-05-15 07:52:53 +00:00
parent 262529fdfb
commit 4425e21343

View File

@ -3518,13 +3518,13 @@ unexpand_shvar() {
test "$#" -eq 0 && return
for n do
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
expr=["${expr};s|"'\("[^$"]*\)'"$v|\\1\${$n}\"|g"]
AS_CASE(["$v"], [*'${'*'}'*], [expr=["$expr;s|$v|\"\${$n}\"|g"]])
fi
done
expr=['s/${[^${}"]*}/"&"/g;'"${expr};"'s/"\(\${[^${}"]*}\)"/\1/g']
expr=['s/\${[^${}"]*}/"&"/g;'"${expr};"'s/"\(\${[^${}"]*}\)"/\1/g']
eval $var='"`echo \"\\\"${'$var'}\\\"\" | sed \"$expr;s/\\\"//g\"`"'
}