From 05118b018c2ef65b2a94dfc6893bfd537b301fb2 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Fri, 13 Jan 2023 15:17:35 -0700 Subject: [PATCH] var corrections and simplify --- sync/common_8 | 12 +++++------- sync/common_9 | 11 +++-------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/sync/common_8 b/sync/common_8 index f35ac55..8b5bc89 100644 --- a/sync/common_8 +++ b/sync/common_8 @@ -4,34 +4,32 @@ case "${RLREL}" in stable) REVISION=8.7 - MAJOR="${REVISION:0:1}" - MINOR="${REVISION:2:1}" APPEND_TO_DIR="-RC1" ;; beta) REVISION=8.8 - MAJOR="${REVISION:0:1}" - MINOR="${REVISION:2:1}" APPEND_TO_DIR="-BETA" + COMPOSE_APPEND="${APPEND_TO_DIR}" ;; lh) REVISION=8.8 - MAJOR="${REVISION:0:1}" - MINOR="${REVISION:2:1}" APPEND_TO_DIR="-LookAhead" + COMPOSE_APPEND="${APPEND_TO_DIR}" ;; *) echo "option no recognized" ;; esac +MAJOR="${REVISION%.*}" +MINOR="${REVISION#*.}" STAGING_ROOT="/mnt/repos-staging" PRODUCTION_ROOT="/mnt/repos-production" # relative to ${ENV}_ROOT CATEGORY_STUB="mirror/pub/rocky" RELEASE_DIR="${CATEGORY_STUB}/${REVISION}${APPEND_TO_DIR}" -RELEASE_COMPOSE_ROOT="${COMPOSE_ROOT}/${MAJ}${APPEND_TO_DIR}" +RELEASE_COMPOSE_ROOT="${COMPOSE_ROOT}/${MAJOR}${COMPOSE_APPEND}" # Set all repos that have no comps/groups associated with them. This is even in # cases where repos will not be available by normal means. It's just for diff --git a/sync/common_9 b/sync/common_9 index 5e74d22..89e720f 100644 --- a/sync/common_9 +++ b/sync/common_9 @@ -4,20 +4,14 @@ case "${RLREL}" in stable) REVISION=9.1 - MAJOR="${REVISION:0:1}" - MINOR="${REVISION:2:1}" APPEND_TO_DIR="-RC4" ;; beta) REVISION=9.2 - MAJOR="${REVISION:0:1}" - MINOR="${REVISION:2:1}" APPEND_TO_DIR="-BETA" ;; lh) REVISION=9.2 - MAJOR="${REVISION:0:1}" - MINOR="${REVISION:2:1}" APPEND_TO_DIR="-LookAhead" ;; *) @@ -25,15 +19,16 @@ case "${RLREL}" in ;; esac +MAJOR="${REVISION%.*}" +MINOR="${REVISION#*.}" ARCHES=(x86_64 aarch64 ppc64le s390x) - STAGING_ROOT="/mnt/repos-staging" PRODUCTION_ROOT="/mnt/repos-production" # relative to ${ENV}_ROOT CATEGORY_STUB="mirror/pub/rocky" RELEASE_DIR="${CATEGORY_STUB}/${REVISION}${APPEND_TO_DIR}" -RELEASE_COMPOSE_ROOT="${COMPOSE_ROOT}/${MAJ}" +RELEASE_COMPOSE_ROOT="${COMPOSE_ROOT}/${MAJOR}" # Set all repos that have no comps/groups associated with them. This is even in # cases where repos will not be available by normal means. It's just for