From 7343bef3cf371aed07384e8bca146391c9d2f7e0 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Wed, 7 Feb 2024 15:48:36 -0600 Subject: [PATCH] simplified script. --- scripts/pull_containers.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) mode change 100644 => 100755 scripts/pull_containers.sh diff --git a/scripts/pull_containers.sh b/scripts/pull_containers.sh old mode 100644 new mode 100755 index 9cf7219..d32dfe8 --- a/scripts/pull_containers.sh +++ b/scripts/pull_containers.sh @@ -1,11 +1,8 @@ #!/bin/sh -mapfile -t AVAILABLE_IMAGES < <(run show container image | awk '{ if ( NR > 1 ) { print $1 ":" $2} }') 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 - echo "Pulling image ${image}" - podman pull image "${image}" -fi + echo "Pulling image ${image}" + podman pull "${image}" done