From 13eb2d51c7284472efabc278bf9b7ec0b8575e47 Mon Sep 17 00:00:00 2001 From: doc Date: Sun, 14 Sep 2025 22:13:41 +0000 Subject: first commit --- archmirror-repos.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 archmirror-repos.sh (limited to 'archmirror-repos.sh') diff --git a/archmirror-repos.sh b/archmirror-repos.sh new file mode 100755 index 0000000..f15504a --- /dev/null +++ b/archmirror-repos.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# /usr/local/sbin/archmirror-repos.sh +set -euo pipefail +UPSTREAM="rsync://mirror.csclub.uwaterloo.ca/archlinux/" +STAGE="/brimstone3/mirror-stage/arch-repos" +LIVE="/brimstone1/mirror/archlinux" +LOG="/var/log/mirrors/arch-repos.log" + +mkdir -p "$STAGE" "$LIVE" + +rsync -rtlH --safe-links --delete-delay --delay-updates \ + --exclude iso/ --exclude other/ \ + "$UPSTREAM" "$STAGE" | tee -a "$LOG" + +rsync -rtlH --safe-links --delete-delay --delay-updates \ + --exclude iso/ --exclude other/ \ + "$UPSTREAM" "$STAGE" | tee -a "$LOG" + +curl -fsS https://geo.mirror.pkgbuild.com/lastsync > "$LIVE/lastsync" \ + || date -u +%s > "$LIVE/lastsync" + +ln -sfn "$STAGE" "$LIVE" +date -u +%s > "$LIVE/lastsync" + -- cgit v1.2.3