From faafe8bfb97e7b05afbcc903cc946d9fca038df5 Mon Sep 17 00:00:00 2001 From: Gaƫtan Gilbert Date: Wed, 16 Dec 2020 10:22:56 +0100 Subject: Fix overlay system: projects need to be loaded before overlays. Also fixes is_in_projects --- dev/ci/ci-basic-overlay.sh | 7 +++---- dev/ci/ci-common.sh | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'dev/ci') diff --git a/dev/ci/ci-basic-overlay.sh b/dev/ci/ci-basic-overlay.sh index dd683c96a9..18c58c423d 100755 --- a/dev/ci/ci-basic-overlay.sh +++ b/dev/ci/ci-basic-overlay.sh @@ -7,11 +7,10 @@ declare -a projects # the list of project repos that can be be overlayed # checks if the given argument is a known project function is_in_projects { - local rc=1 - for x in ${projects[@]}; do - if [ "$1" = "$x" ]; then rc=0; fi; + for x in "${projects[@]}"; do + if [ "$1" = "$x" ]; then return 0; fi; done - return rc + return 1 } # project [] diff --git a/dev/ci/ci-common.sh b/dev/ci/ci-common.sh index fdba690155..8d8f78e10c 100644 --- a/dev/ci/ci-common.sh +++ b/dev/ci/ci-common.sh @@ -73,14 +73,14 @@ function overlay() } set +x +# shellcheck source=ci-basic-overlay.sh +. "${ci_dir}/ci-basic-overlay.sh" + for overlay in "${ci_dir}"/user-overlays/*.sh; do # shellcheck source=/dev/null # the directoy can be empty if [ -e "${overlay}" ]; then . "${overlay}"; fi done - -# shellcheck source=ci-basic-overlay.sh -. "${ci_dir}/ci-basic-overlay.sh" set -x # [git_download project] will download [project] and unpack it -- cgit v1.2.3