skip empty lines

This commit is contained in:
Daniel Langbein 2021-11-08 19:46:55 +01:00
parent 72de32d989
commit 9cb501328d

View File

@ -100,9 +100,16 @@ before continuing with the next line.";
# trim leading/tailing whitespaces
line="$(echo "${line}" | xargs)" || return $?
space_separated_to_array line pkgs
# skip empty lines
# shellcheck disable=SC2154
if [ "${#pkgs[@]}" -eq 0 ]; then
echo "Skipped empty line."
continue;
fi
# Rebuild the docker image with refreshed mirrors => this fetches packages that were built in a previous build stage
update-build-image || return $?
# shellcheck disable=SC2154
build-and-push "${pkgs[@]}" || exit $?
done