Use '|' as separator in sed expression => less escaping and better readability.

This commit is contained in:
Ivan Davidov 2017-11-24 15:01:49 +02:00 committed by GitHub
parent e5c719259e
commit 4eda15aca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,8 +52,8 @@ else
fi
# This variable holds the full path to the glibc installation area as quoted string.
# All back slashes are escaped (/ => \/) in order to keep the 'sed' command stable.
SYSROOT_ESCAPED=$(echo \"$SYSROOT\" | sed 's/\//\\\//g')
# All forward slashes are escaped (/ => \/) in order to keep the 'sed' command stable.
SYSROOT_ESCAPED=$(echo \"$SYSROOT\" | sed 's|/|\\/|g')
# Now we tell BusyBox to use the glibc prepared area.
sed -i "s/.*CONFIG_SYSROOT.*/CONFIG_SYSROOT=$SYSROOT_ESCAPED/" .config