## # systr_rsync_normal [] # # Perform normal rsync operations to transfer files to or from the # repository. If is set, it is used as the --link-dest value # for rsync. This function is polymorphic for both local and remote # repositories. ## function systr_rsync_normal { if [ $# -lt 2 ]; then echo "Fatal: too few arguments to systr_rsync_normal" exit 1 fi src="$1" dst="$2" if [ $# -gt 2 ]; then link="--link-dest=\"$3\"" else link="" fi if [[ "$remote" == "" ]]; then rsync -az --info=progress2 --info=stats2 \ --delete --exclude='*.systr' \ $link \ "$src" "$dst" else if [[ "$src" == "." ]]; then dst="$remote:$dst" else src="$remote:$src" fi rsync -az -e ssh --info=progress2 --info=stats2 \ --delete --exclude='*.systr' \ $link \ "$src" "$dst" fi }