Syntax expansion bugfix for linting suggestion
Fix to use '$$' instead of '$' for proper variable expansion. Add check to fail build if list is empty. Change-Id: Ia86f789e49538fff02c56f63079aef4eb3f01b5d
This commit is contained in:
parent
b2fddf30fd
commit
3628175efc
@ -113,7 +113,11 @@ ifeq ($(IMAGE_TYPE), iso)
|
|||||||
else
|
else
|
||||||
# Assemble all images based on configs defined in each subdirectory
|
# Assemble all images based on configs defined in each subdirectory
|
||||||
# Trailing / allows proper function with symlinks
|
# Trailing / allows proper function with symlinks
|
||||||
iterDirs="$(find $(QCOW_BUNDLE)/ -maxdepth 1 -mindepth 1 -type d -exec basename {} \;)"
|
iterDirs="$$(find $(QCOW_BUNDLE)/ -maxdepth 1 -mindepth 1 -type d -exec basename {} \;)"
|
||||||
|
if [[ -z $$iterDirs ]]; then
|
||||||
|
echo "Could not find any qcow images defined for bundle - exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
for subdir in $$iterDirs; do
|
for subdir in $$iterDirs; do
|
||||||
# QCOW configs
|
# QCOW configs
|
||||||
export osconfig_params="$(QCOW_BUNDLE)/$$subdir/osconfig-vars.yaml"
|
export osconfig_params="$(QCOW_BUNDLE)/$$subdir/osconfig-vars.yaml"
|
||||||
@ -137,8 +141,12 @@ ifneq ($(QCOW_BUNDLE_DIRS), )
|
|||||||
else
|
else
|
||||||
# Assemble all images based on configs defined in each $(IMAGE_TYPE)* subdirectory
|
# Assemble all images based on configs defined in each $(IMAGE_TYPE)* subdirectory
|
||||||
# Trailing / allows proper function with symlinks
|
# Trailing / allows proper function with symlinks
|
||||||
bundleDirs="$(find $(WORKDIR)/ -maxdepth 1 -mindepth 1 -name "qcow-bundle*" -type d -exec basename {} \;)"
|
bundleDirs="$$(find $(WORKDIR)/ -maxdepth 1 -mindepth 1 -name "qcow-bundle*" -type d -exec basename {} \;)"
|
||||||
endif
|
endif
|
||||||
|
if [[ -z $$bundleDirs ]]; then
|
||||||
|
echo "Could not find any qcow bundle directories - exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
for bundledir in $$bundleDirs; do
|
for bundledir in $$bundleDirs; do
|
||||||
export QCOW_BUNDLE="$(WORKDIR)/$$bundledir"
|
export QCOW_BUNDLE="$(WORKDIR)/$$bundledir"
|
||||||
sudo -E make cut_image
|
sudo -E make cut_image
|
||||||
|
Loading…
x
Reference in New Issue
Block a user