aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sync-binpackages.sh')
-rwxr-xr-xsync-binpackages.sh40
1 files changed, 29 insertions, 11 deletions
diff --git a/sync-binpackages.sh b/sync-binpackages.sh
index da94c33..dbee1d7 100755
--- a/sync-binpackages.sh
+++ b/sync-binpackages.sh
@@ -1,19 +1,37 @@
#!/bin/bash
# Copyright 2011-2023 Gentoo Authors; Distributed under the GPL v2
-# this is the directory where the tree is fully assembled and all packages are signed
+# for testing
+ARCHES="arm64 sparc"
+
+# Keep this variable in sync in both sign-binpackages.sh & sync-binpackages.sh
+_ARCHES="alpha amd64 arm64 arm hppa ia64 loong m68k mips ppc riscv s390 sh sparc x86"
+ #alpha amd64 arm64 arm hppa ia64 loong m68k mips ppc riscv s390 sh sparc x86
+ARCHES=${ARCHES:-${_ARCHES}}
+
+# this is the directory where all packages are signed
# we assume it's on dipper / releng-incoming, but might as well give a full rsync
# specification here
-INITIALDIR="/release/binpackages"
+SRCDIR="/release/binpackages"
+# append ${a}
-FINALDIR="/var/tmp/gmirror-releases/binpackages"
-RSYNC="/usr/bin/rsync"
-RSYNC_ARGS="--no-motd --recursive --times --links --ignore-errors --delete --delete-after --timeout=300 --exclude=timestamp*"
-RSYNC_ARGS="${RSYNC_ARGS} --quiet"
+# this is the outgoing directory
+DSTDIR="/var/tmp/gmirror-releases/releases"
+# append ${a}/binpackages
-[[ -d ${FINALDIR} ]] || mkdir ${FINALDIR}
-${RSYNC} ${RSYNC_ARGS} ${INITIALDIR}/ ${FINALDIR}/
+RSYNC="/usr/bin/rsync"
+RSYNC_OPTS=(
+ --no-motd
+ --archive
+ --ignore-errors
+ --delete
+ --delete-after
+ --timeout=300
+ --quiet
+ --mkpath
+)
-/bin/date -u '+%s %c' > ${FINALDIR}/timestamp.x
-/bin/date -R -u > ${FINALDIR}/timestamp.chk
-/bin/date -u '+%s' > ${FINALDIR}/timestamp.mirmon
+for a in ${ARCHES}; do
+ [[ -d ${DSTDIR}${a}/binpackages ]] || mkdir ${DSTDIR}/${a}/binpackages
+ ${RSYNC} ${RSYNC_ARGS} ${SRCDIR}/${a}/* ${DSTDIR}/${a}/binpackages/
+done