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 <jean-christophe@guillain.net>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
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")"