Update centos-10-sync script to rsync

Signed-off-by: james02135 <james02135@hotmail.com>

Change DESTDIR to previously used directory, exlcude debug directory

Signed-off-by: james02135 <james02135@hotmail.com>
This commit is contained in:
james02135 2024-06-18 15:34:57 +01:00 committed by kevin
parent bba5d4340e
commit decfe3e771

View file

@ -1,21 +1,18 @@
#!/bin/sh #!/bin/sh
#Sync using reposync instead of rsync until available ## Set up variables we use
SERVER=composes.stream.centos.org RSYNC='/usr/bin/rsync'
TOPDIR=stream-10/production/latest-CentOS-Stream/compose RS_OPT="-avSHP --numeric-ids"
RS_DEADLY="--delete --delete-delay --delay-updates"
## mirror CentOS-10 CENT_EXCLUDES="--exclude=isos --exclude=kickstart --exclude=images --exclude=debug"
DESTDIR=/mnt/fedora/app/fi-repo/centos/centos-10 SERVER=centos-master01.iad2.fedoraproject.org
mkdir -p ${DESTDIR} ## Mirror CentOS-10-Stream
for basearch in aarch64 ppc64le s390x x86_64 RSYNC_DESTDIR=/mnt/fedora/app/fi-repo/centos/centos-10/
do RSYNC_MOD="CentOS-Stream-Ref/10-stream/"
for repo in BaseOS AppStream CRB
do mkdir -p ${RSYNC_DESTDIR}
mkdir -p $DESTDIR/$repo/$basearch
cd $DESTDIR/$repo/$basearch ${RSYNC} ${RS_OPT} ${RS_DEADLY} ${CENT_EXCLUDES} ${SERVER}::${RSYNC_MOD} ${RSYNC_DESTDIR}
reposync --download-metadata --disablerepo=* --repofrompath=os,https://$SERVER/$TOPDIR/$repo/$basearch/os/ --enablerepo=os
done
done