RET=1 COUNTER=100 until [[ RET -eq 0 && COUNTER -gt 0 ]]; do rsync -rtlH --safe-links --delete-after --progress -h --timeout=600 --contimeout=60 -p \ --delay-updates --no-motd --bwlimit=4096 \ --temp-dir="/tmp" \ --exclude='*.links.tar.gz*' \ --exclude='/other' \ --exclude='/sources' \ --exclude='/iso' \ 'rsync://mirror.pkgbuild.com/packages/' \ "/srv/repo" && RET=0 COUNTER=$[COUNTER-1] done;