toolkit/sync/sync-to-staging-sig.sh

18 lines
671 B
Bash
Raw Normal View History

2021-07-05 06:50:25 +00:00
#!/bin/bash
# Major Version (eg, 8)
MAJOR=${1}
# Short name (eg, NFV, extras, Rocky, gluster9)
SHORT=${2}
# The directory where we're going to, usually MAJOR.MINOR, sometimes it's MAJOR.MINOR-RCX
REVISION=${3}
# Note, this should be lowercase. eg, storage.
SIG=${4}
cd /mnt/compose/${MAJOR}/latest-${SHORT}-${MAJOR}
ret_val=$?
if [ $ret_val -eq "0" ]; then
mkdir -p /mnt/repos-staging/mirror/pub/rocky/${REVISION}/${SIG}
sudo -l && find **/* -maxdepth 0 -type d | parallel --will-cite -j 18 sudo rsync -av --chown=10004:10005 --progress --relative --human-readable {} /mnt/repos-staging/mirror/pub/rocky/${REVISION}/${SIG}
else
echo "Failed to change directory"
fi