From 5ce6c3065afa4f0b1286c564dfd435ce7978c2fa Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Sun, 31 Jul 2022 20:19:22 -0700 Subject: [PATCH] add separate sig file list sync --- sync/sync-sig-file-list.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sync/sync-sig-file-list.sh diff --git a/sync/sync-sig-file-list.sh b/sync/sync-sig-file-list.sh new file mode 100644 index 0000000..01ef272 --- /dev/null +++ b/sync/sync-sig-file-list.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# Syncs everything from staging to production + +# Source common variables +# shellcheck disable=SC2046,1091,1090 +source "$(dirname "$0")/common" + +REV=${REVISION}${APPEND_TO_DIR} + +cd "${PRODUCTION_ROOT}/${SIG_CATEGORY_STUB}" || { echo "Failed to change directory"; ret_val=1; exit 1; } +ret_val=$? + +if [ $ret_val -eq "0" ]; then + # Full file list update for production root + cd "${PRODUCTION_ROOT}/${SIG_CATEGORY_STUB}" || echo { echo "Failed to change directory"; exit 1; } + echo "Starting full file list for root" + find . > fullfilelist + echo "Generating filelist for quick-fedora-mirror users" + if [[ -f /usr/local/bin/create-filelist ]]; then + # We're already here, but Justin Case wanted this + cd "${PRODUCTION_ROOT}/" || { echo "Failed to change directory"; exit 1; } + /bin/cp fullfiletimelist-sig fullfiletimelist-sig-old + /usr/local/bin/create-filelist > fullfiletimelist-sig + cp fullfiletimelist-sig fullfiletimelist + fi + chown 10004:10005 fullfilelist fullfiletimelist-sig fullfiletimelist +fi +