From 772152a5810aa8c4e03cf167381aadc4ec00499f Mon Sep 17 00:00:00 2001 From: doc Date: Wed, 1 Oct 2025 20:35:47 +0000 Subject: mirror scripts --- portage-timestamp.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 portage-timestamp.sh (limited to 'portage-timestamp.sh') diff --git a/portage-timestamp.sh b/portage-timestamp.sh new file mode 100755 index 0000000..cbe006d --- /dev/null +++ b/portage-timestamp.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# try-portage-timestamp.sh +# Loop through Gentoo rsync mirrors and grab timestamp.chk + +MIRRORS=( + rsync://rsync.gentoo.org/gentoo-portage/metadata/timestamp.chk + rsync://rsync1.de.gentoo.org/gentoo-portage/metadata/timestamp.chk + rsync://rsync.uk.gentoo.org/gentoo-portage/metadata/timestamp.chk + rsync://rsync.fr.gentoo.org/gentoo-portage/metadata/timestamp.chk + rsync://rsync.us.gentoo.org/gentoo-portage/metadata/timestamp.chk +) + +for SRC in "${MIRRORS[@]}"; do + echo "Trying $SRC ..." + OUT=$(rsync --no-motd "$SRC" /dev/stdout 2>/dev/null) + if [[ -n "$OUT" ]]; then + echo ">>> Success from $SRC" + echo "$OUT" + exit 0 + fi +done + +echo "!!! No mirror returned a timestamp.chk" +exit 1 -- cgit v1.2.3