diff options
Diffstat (limited to 'scripts/config')
-rwxr-xr-x | scripts/config | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/config b/scripts/config index a7c7c4b8e957..ed6653ef9702 100755 --- a/scripts/config +++ b/scripts/config | |||
@@ -107,7 +107,8 @@ while [ "$1" != "" ] ; do | |||
107 | ;; | 107 | ;; |
108 | 108 | ||
109 | --set-str) | 109 | --set-str) |
110 | set_var "CONFIG_$ARG" "CONFIG_$ARG=\"$1\"" | 110 | # sed swallows one level of escaping, so we need double-escaping |
111 | set_var "CONFIG_$ARG" "CONFIG_$ARG=\"${1//\"/\\\\\"}\"" | ||
111 | shift | 112 | shift |
112 | ;; | 113 | ;; |
113 | 114 | ||
@@ -124,9 +125,11 @@ while [ "$1" != "" ] ; do | |||
124 | if [ $? != 0 ] ; then | 125 | if [ $? != 0 ] ; then |
125 | echo undef | 126 | echo undef |
126 | else | 127 | else |
127 | V="${V/CONFIG_$ARG=/}" | 128 | V="${V/#CONFIG_$ARG=/}" |
128 | V="${V/\"/}" | 129 | V="${V/#\"/}" |
129 | echo "$V" | 130 | V="${V/%\"/}" |
131 | V="${V/\\\"/\"}" | ||
132 | echo "${V}" | ||
130 | fi | 133 | fi |
131 | fi | 134 | fi |
132 | ;; | 135 | ;; |