From 51f770404afea4cfa5544fee4b6ffccf9dbd06cc Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 4 Feb 2025 09:43:24 +0900 Subject: [PATCH] copy-firmware: Fix 'No such file or directory' error. Attempting to clear the PARALLEL_ARGS_FILE variable when it was not set would cause the above error message. Clear it only when we know we are using it. This bug was only triggered when using the 'deb' target, as it invokes the copy-firmware.sh script without any '-j' argument, while the other install targets end up passing '-j1' when not using parallel compression. * copy-firmware.sh [NUM_JOBS > 1]: Only clear the content of PARALLEL_ARGS_FILE when this condition is met. Reported-by: Christophe Guillain Signed-off-by: Maxim Cournoyer --- copy-firmware.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copy-firmware.sh b/copy-firmware.sh index e64b5677..dd4b9b6f 100755 --- a/copy-firmware.sh +++ b/copy-firmware.sh @@ -111,9 +111,9 @@ grep -E '^(RawFile|File):' WHENCE | sed -E -e 's/^(RawFile|File): */\1 /;s/"//g' done if [ "$num_jobs" -gt 1 ]; then parallel -j"$num_jobs" -a "$parallel_args_file" + echo > "$parallel_args_file" # prepare for next run fi -echo > "$parallel_args_file" # shellcheck disable=SC2162 # file/folder name can include escaped symbols grep -E '^Link:' WHENCE | sed -e 's/^Link: *//g;s/-> //g' | while read l t; do directory="$destdir/$(dirname "$l")"