build-stx-images.sh: proper shell quoting

The "--only" parameter doesn't work properly in some circumstances and
builds more images than requested. Solution: add shell quotes.

TESTS
===================================

Run build-stx-images.sh --only stx-audit,stx-audit [...]
and make sure it builds only the requested image.

Closes-Bug: 1977879
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: I4c9ddb16dd5e447c38d29e442f4e6790e5d146bb
This commit is contained in:
Davlet Panech 2022-06-07 15:21:16 -04:00
parent ca31308cb2
commit e712f134b9

View File

@ -995,10 +995,10 @@ function find_image_build_files {
all_labels["$LABEL"]="$image_build_file"
# skip images we don't want to build
if is_in ${PROJECT} ${SKIP[@]} || is_in ${LABEL} ${SKIP[@]}; then
if is_in "${PROJECT}" ${SKIP[@]} || is_in "${LABEL}" ${SKIP[@]}; then
continue
fi
if ! is_empty ${ONLY[@]} && ! is_in ${PROJECT} ${ONLY[@]} && ! is_in ${LABEL} ${ONLY[@]}; then
if ! is_empty ${ONLY[@]} && ! is_in "${PROJECT}" ${ONLY[@]} && ! is_in "${LABEL}" ${ONLY[@]}; then
continue
fi