autojen/scripts/sync_alt_repo

20 lines
420 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 \
-avlpztc \
-P \
--stats \
--delete-after \
--exclude 'SRPMS*/' \
"rsync://${MIRRORS_SRC}/altlinux/${PLATFORM}/branch" \
"${MIRRORS_DEST}/${PLATFORM}/" > "${MIRRORS_DEST}/${PLATFORM}.log" 2>&1