[前][次][番号順一覧][スレッド一覧]

ruby-changes:27454

From: nobu <ko1@a...>
Date: Tue, 26 Feb 2013 15:04:32 +0900 (JST)
Subject: [ruby-changes:27454] nobu:r39506 (trunk): configure.in: non-portable shell behavior

nobu	2013-02-26 15:04:22 +0900 (Tue, 26 Feb 2013)

  New Revision: 39506

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39506

  Log:
    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]

  Modified files:
    trunk/ChangeLog
    trunk/configure.in

Index: configure.in
===================================================================
--- configure.in	(revision 39505)
+++ configure.in	(revision 39506)
@@ -3281,19 +3281,19 @@ shvar_to_cpp() { https://github.com/ruby/ruby/blob/trunk/configure.in#L3281
 }
 
 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/\\\"\\\$//\"`"'
 }
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39505)
+++ ChangeLog	(revision 39506)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Feb 26 15:04:19 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@r...>
 
 	* parse.y (IS_LABEL_POSSIBLE): allow labels for keyword arguments just

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]