config.sub: normalize the quoting in the echo FOO | sed ...

Some cases quote the argument to echo and some do not.  At runtime
it probably does not matter because the substituted values will never
contain whitespace, but quoting them all would make shellcheck more
useful.

* config.sub: Consistently quote the argument of echo.
* doc/config.sub.1: Regenerate.

Suggested-by: Jacob Bachmeyer <jcb@gnu.org>
Signed-off-by: Ozkan Sezer <sezero@users.sourceforge.net>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
This commit is contained in:
Ozkan Sezer 2021-07-03 11:05:40 +03:00 committed by Dmitry V. Levin
parent 0ee661a9f9
commit 79549b168d
2 changed files with 10 additions and 10 deletions

18
config.sub vendored
View File

@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2021 Free Software Foundation, Inc.
timestamp='2021-06-03'
timestamp='2021-07-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -1292,15 +1292,15 @@ then
case $basic_os in
gnu/linux*)
kernel=linux
os=`echo $basic_os | sed -e 's|gnu/linux|gnu|'`
os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
;;
os2-emx)
kernel=os2
os=`echo $basic_os | sed -e 's|os2-emx|emx|'`
os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
;;
nto-qnx*)
kernel=nto
os=`echo $basic_os | sed -e 's|nto-qnx|qnx|'`
os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
;;
*-*)
# shellcheck disable=SC2162
@ -1311,11 +1311,11 @@ EOF
# Default OS when just kernel was specified
nto*)
kernel=nto
os=`echo $basic_os | sed -e 's|nto|qnx|'`
os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
;;
linux*)
kernel=linux
os=`echo $basic_os | sed -e 's|linux|gnu|'`
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
;;
*)
kernel=
@ -1336,7 +1336,7 @@ case $os in
os=cnk
;;
solaris1 | solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
;;
solaris)
os=solaris2
@ -1365,7 +1365,7 @@ case $os in
os=sco3.2v4
;;
sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
;;
sco*v* | scout)
# Don't match below
@ -1441,7 +1441,7 @@ case $os in
;;
# Preserve the version number of sinix5.
sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
os=`echo "$os" | sed -e 's|sinix|sysv|'`
;;
sinix*)
os=sysv4

View File

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16.
.TH CONFIG.SUB "1" "June 2021" "GNU config.sub (2021-06-03)" "User Commands"
.TH CONFIG.SUB "1" "July 2021" "GNU config.sub (2021-07-03)" "User Commands"
.SH NAME
config.sub \- validate and canonicalize a configuration triplet
.SH SYNOPSIS