Skip to content

Commit

Permalink
scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour
Browse files Browse the repository at this point in the history
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: fdb8fd8 ("git-submodule: allow partial update of .git-submodule-status")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20230720153038.1587196-1-peter.maydell@linaro.org
  • Loading branch information
pm215 committed Jul 25, 2023
1 parent c644554 commit f9540bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/git-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;;
Expand Down

0 comments on commit f9540bb

Please sign in to comment.