autojen/scripts/sync_alt_repo

20 lines
378 B
Bash

#! /bin/sh
set -eu
MIRRORS_SRC="${MIRRORS_SRC:-ftp.altlinux.org}"
MIRRORS_DEST="${MIRRORS_DEST:-/data/mirrors/alt}"
PLATFORM="${PLATFORM:-p8}"
mkdir -p "${MIRRORS_DEST}/${PLATFORM}"
/usr/bin/rsync \
--timeout=6000 \
-avlpzt \
-P \
--stats \
--delete-after \
--exclude 'SRPMS*/' \
"rsync://${MIRRORS_SRC}/altlinux/${PLATFORM}/branch" \
"${MIRRORS_DEST}/${PLATFORM}/"