#! /bin/sh set -eu # Script to synchronize ALT Linux repository branches from remote # sources to local. MIRRORS_SRC="${MIRRORS_SRC:-ftp.altlinux.org}" MIRRORS_DEST="${MIRRORS_DEST:-/data/mirrors/alt}" PLATFORM="${PLATFORM:-p8}" RSYNC_SRC="rsync://${MIRRORS_SRC}/altlinux/${PLATFORM}/branch" RSYNC_DST="${MIRRORS_DEST}/${PLATFORM}/" mkdir -p "${RSYNC_DST}" echo "Rsyncing from: ${RSYNC_SRC}" echo "Rsyncing to: ${RSYNC_DST}" /usr/bin/rsync \ --timeout=6000 \ -avlpzt \ -P \ --stats \ --delete-after \ --exclude 'SRPMS*/' \ "${RSYNC_SRC}" \ "${RSYNC_DST}/"