From f9540bb1b2d35d2b0f7e831208c5f44854896cd0 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 25 Jul 2023 10:56:51 +0100 Subject: scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The POSIX definition of the 'read' utility requires that you specify the variable name to set; omitting the name and having it default to 'REPLY' is a bashism. If your system sh is dash, then it will print an error message during build: qemu/pc-bios/s390-ccw/../../scripts/git-submodule.sh: 106: read: arg count Specify the variable name explicitly. Fixes: fdb8fd8cb915647b ("git-submodule: allow partial update of .git-submodule-status") Signed-off-by: Peter Maydell Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-id: 20230720153038.1587196-1-peter.maydell@linaro.org --- scripts/git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh index 335f7f5fdf..bb1222c772 100755 --- a/scripts/git-submodule.sh +++ b/scripts/git-submodule.sh @@ -103,7 +103,7 @@ update) check_updated $module || echo Updated "$module" done - (while read -r; do + (while read -r REPLY; do for module in $modules; do case $REPLY in *" $module "*) continue 2 ;; -- cgit v1.2.3