From 44a1cd08b9e7f5e438a41af1eba19d60a92431d0 Mon Sep 17 00:00:00 2001 From: nazunalika Date: Mon, 5 Jul 2021 03:43:58 -0700 Subject: [PATCH] missing logic --- sync/prep-staging.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sync/prep-staging.sh b/sync/prep-staging.sh index d7f7c3e..f39cecc 100644 --- a/sync/prep-staging.sh +++ b/sync/prep-staging.sh @@ -104,9 +104,15 @@ for x in "${ARCHES[@]}"; do for y in "${MODS[@]}"; do echo "Modules: ${y} ${x}" cp "/mnt/compose/8_metadata/${x}/${y}-modules.yaml" /tmp/modules.yaml - modifyrepo --mdtype=modules /tmp/modules.yaml \ - "${COMPOSE_DIR}/${y}/${x}/os/repodata" \ - --compress --compress-type=gz + test -d "${COMPOSE_DIR}/${y}/${x}/os" + ret_val=$? + if [ "$ret_val" -eq 0 ]; then + modifyrepo --mdtype=modules /tmp/modules.yaml \ + "${COMPOSE_DIR}/${y}/${x}/os/repodata" \ + --compress --compress-type=gz + else + echo "${COMPOSE_DIR}/${y}/${x}/os does not exist" + fi rm /tmp/modules.yaml sleep 1