blob: 395e28aedb9ef68d4ca8e8f2535e7c3886c5d497 (
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
|
#!/usr/bin/env bash
# /usr/local/sbin/archmirror-repos.sh
set -euo pipefail
UPSTREAM="rsync://mirror.csclub.uwaterloo.ca/archlinux/"
STAGE="/brimstone3a/mirror-stage/arch-repos"
LIVE="/brimstone2a/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"
|