configure.in: non-portable shell behavior

* configure.in (unexpand_shvar): get rid of non-portable shell
  behavior on OpenBSD, so no extra quotes.  [Bug #7959]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-02-26 06:04:22 +00:00
Родитель 6f8feb2276
Коммит a4ccd46d31
2 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Tue Feb 26 15:04:19 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (unexpand_shvar): get rid of non-portable shell
behavior on OpenBSD, so no extra quotes. [Bug #7959]
Tue Feb 26 10:24:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (IS_LABEL_POSSIBLE): allow labels for keyword arguments just

Просмотреть файл

@ -3281,19 +3281,19 @@ shvar_to_cpp() {
}
unexpand_shvar() {
local var=$1 val n v expr quote
local var=$1 val n v expr
shift
test "$#" -eq 0 && return
quote=['s/${[^${}"]*}/"&"/g']
quote=['']
for n do
eval v='"$'$n'"'
v="`echo \"$v\" | sed -e \"$quote\" -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=["${quote}${expr};"'s/"\(\${[^${}"]*}\)"/\1/g']
expr=['s/${[^${}"]*}/"&"/g;'"${expr};"'s/"\(\${[^${}"]*}\)"/\1/g']
eval $var='"`echo \"\\\"${'$var'}\\\"\" | sed \"$expr;s/\\\"\\\"//g;s/^\\\"//;s/\\\"\\\$//\"`"'
}