mirror of
git://git.savannah.gnu.org/config.git
synced 2025-05-26 09:06:38 +12:00
config.sub: disable shellcheck warning SC2162 globally.
With the version of shellcheck I have (0.9.0), the existing attempts to disable SC2162, above each use of read without -r, do not work because they are not on the line *immediately* previous to the read command — there’s always a “saved_IFS=$IFS” line in between. Since this script must not use read -r at all, we should just be disabling SC2162 globally. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
This commit is contained in:
parent
4155d89d0c
commit
36cf0e057a
5
config.sub
vendored
5
config.sub
vendored
@ -2,7 +2,7 @@
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale
|
||||
|
||||
timestamp='2024-03-12'
|
||||
|
||||
@ -120,7 +120,6 @@ case $# in
|
||||
esac
|
||||
|
||||
# Split fields of configuration type
|
||||
# shellcheck disable=SC2162
|
||||
saved_IFS=$IFS
|
||||
IFS="-" read field1 field2 field3 field4 <<EOF
|
||||
$1
|
||||
@ -937,7 +936,6 @@ case $basic_machine in
|
||||
;;
|
||||
|
||||
*-*)
|
||||
# shellcheck disable=SC2162
|
||||
saved_IFS=$IFS
|
||||
IFS="-" read cpu vendor <<EOF
|
||||
$basic_machine
|
||||
@ -1307,7 +1305,6 @@ case $basic_os in
|
||||
os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
|
||||
;;
|
||||
*-*)
|
||||
# shellcheck disable=SC2162
|
||||
saved_IFS=$IFS
|
||||
IFS="-" read kernel os <<EOF
|
||||
$basic_os
|
||||
|
Loading…
x
Reference in New Issue
Block a user