make.sh: Correctly pass the command return code in run_command

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2024-07-09 08:36:39 +00:00
parent a4578c6928
commit 7a6c3fb0d0

View File

@@ -845,8 +845,11 @@ run_command() {
while :; do
wait "$!"
# Store the return code
r="$?"
# If the return code is >= 128, wait has been interrupted by the timer
if [ "$?" -ge 128 ]; then
if [ "${r}" -ge 128 ]; then
# Update the runtime
case "${quiet}" in
false)
@@ -857,8 +860,6 @@ run_command() {
continue
fi
# Store the return code
r="$?"
break
done