home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

vrsync (398B)


      1 #!/usr/bin/env bash
      2 # Look for /etc/vrsync.conf
      3 # For each line run rsync with on source:target
      4 # and some specials cases
      5 CONF=${CONF:-/etc/vrsync}
      6 
      7 cmd="rsync -ave ssh --progress --size-only --delete --exclude='*~' --exclude=.stfolder"
      8 test -e $CONF || {
      9     echo "$CONF does not exists, bailing…"
     10     exit 1
     11 }
     12 
     13 while IFS='' read -r line || [[ -n "$line" ]]; do
     14     $cmd $line $@
     15 done < "$CONF"