aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2023-08-05 12:19:28 +0200
committerAndreas K. Hüttel <dilfridge@gentoo.org>2023-08-05 12:19:28 +0200
commitc7e6e14bde5e7d1fcede0bd5ff42bbcfc18e52a6 (patch)
tree414d9fde3aed5b32cfd647d6571de12410503eaf
parentsign-autobuilds: avoid cleansign error on EEXISTS (diff)
downloadmastermirror-scripts-c7e6e14bde5e7d1fcede0bd5ff42bbcfc18e52a6.tar.gz
mastermirror-scripts-c7e6e14bde5e7d1fcede0bd5ff42bbcfc18e52a6.tar.bz2
mastermirror-scripts-c7e6e14bde5e7d1fcede0bd5ff42bbcfc18e52a6.zip
add sync-binpackages.sh
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rwxr-xr-xsync-binpackages.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/sync-binpackages.sh b/sync-binpackages.sh
new file mode 100755
index 0000000..bae48af
--- /dev/null
+++ b/sync-binpackages.sh
@@ -0,0 +1,19 @@
+#!/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
+# we assume it's on dipper / releng-incoming, but might as well give a full rsync
+# specification here
+INITIALDIR="blabla"
+
+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"
+
+[[ -d ${FINALDIR} ]] || mkdir ${FINALDIR}
+${RSYNC} ${RSYNC_ARGS} ${INITIALDIR}/ ${FINALDIR}/
+
+/bin/date -u '+%s %c' > ${FINALDIR}/timestamp.x
+/bin/date -R -u > ${FINALDIR}/timestamp.chk
+/bin/date -u '+%s' > ${FINALDIR}/timestamp.mirmon