summaryrefslogtreecommitdiff
path: root/scripts/config
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-27 09:34:02 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-27 09:34:02 +0200
commit48a4cc950348c507580df79632ad53d8a08b6c0e (patch)
treedb4acee92253bf2fb7c7447d8b0bac9431d6a1fa /scripts/config
parent3275158fa52ad2a795f7f52ba4565ea92660c296 (diff)
parent6a8b55ed4056ea5559ebe4f6a4b247f627870d4c (diff)
Merge 5.7-rc3 into char-misc-next
We need the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/config')
-rwxr-xr-xscripts/config5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/config b/scripts/config
index e0e39826dae9..eee5b7f3a092 100755
--- a/scripts/config
+++ b/scripts/config
@@ -7,6 +7,9 @@ myname=${0##*/}
# If no prefix forced, use the default CONFIG_
CONFIG_="${CONFIG_-CONFIG_}"
+# We use an uncommon delimiter for sed substitutions
+SED_DELIM=$(echo -en "\001")
+
usage() {
cat >&2 <<EOL
Manipulate options in a .config file from the command line.
@@ -83,7 +86,7 @@ txt_subst() {
local infile="$3"
local tmpfile="$infile.swp"
- sed -e "s:$before:$after:" "$infile" >"$tmpfile"
+ sed -e "s$SED_DELIM$before$SED_DELIM$after$SED_DELIM" "$infile" >"$tmpfile"
# replace original file with the edited one
mv "$tmpfile" "$infile"
}