From 35088fd5892acd61e576817d9b2ca1d25bfbd80d Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Thu, 16 Nov 2023 10:59:26 -0600 Subject: [PATCH] Fix: Allows there to be a directory in config-parts. --- apply-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apply-config.sh b/apply-config.sh index e84e721..175509f 100755 --- a/apply-config.sh +++ b/apply-config.sh @@ -79,7 +79,7 @@ if "$dry_run"; then else # Pull new container images mapfile -t AVAILABLE_IMAGES < <(run show container image | awk '{ if ( NR > 1 ) { print $1 ":" $2} }') - mapfile -t CONFIG_IMAGES < <(sed -nr "s/set container name .* image '(.*)'/\1/p" /config/config-parts/* | uniq) + mapfile -t CONFIG_IMAGES < <(find /config/config-parts/ -type f -exec sed -nr "s/set container name .* image '(.*)'/\1/p" {} + | sort | uniq) for image in "${CONFIG_IMAGES[@]}"; do if [[ ! " ${AVAILABLE_IMAGES[*]} " =~ \ ${image}\ ]]; then