From 9cb501328d6ff3f1ad799fa74bae0bb790c30a79 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Mon, 8 Nov 2021 19:46:55 +0100 Subject: [PATCH] skip empty lines --- build-pkg/build-all | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build-pkg/build-all b/build-pkg/build-all index 49993d8..dad752d 100755 --- a/build-pkg/build-all +++ b/build-pkg/build-all @@ -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