blob: fe524d9470d99f14059036f0eaae2dee43e336de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/bin/bash
# Copyright 2011-2023 Gentoo Authors; Distributed under the GPL v2
# for testing
ARCHES="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
SRCDIR="/release/binpackages"
# append ${a}
# this is the outgoing directory
DSTDIR="/var/tmp/gmirror-releases/releases"
# append ${a}/binpackages
RSYNC="/usr/bin/rsync"
RSYNC_OPTS=(
--no-motd
--archive
--ignore-errors
--delete
--delete-after
--timeout=300
--mkpath
)
[[ $(whoami) == "gmirror" ]] || exit 111
for a in ${ARCHES}; do
[[ -d ${DSTDIR}/${a}/binpackages ]] || mkdir -p ${DSTDIR}/${a}/binpackages
rsync "${RSYNC_OPTS[@]}" ${SRCDIR}/${a}/* ${DSTDIR}/${a}/binpackages/
done
|