#! /bin/bash 
# Last edited on 2017-01-28 20:45:56 by jstolfi

# Fetch important bitcoin files from manaus.ic.unicamp.br to the Dell Vostro laptop.

source ${HOME}/lib/rsync-preamble.sh
dir="projects/bitcoin"

cd ${HOME}/${dir}/. || ( echo "cannot cd to ${dir}"  1>&2; exit 1 )

rsync -avzu \
  --exclude='*.eps' \
  --exclude='*.log' \
  --exclude='*.pdf' \
  --exclude='*.ps' \
  --exclude='*.tar' \
  --exclude='*.tar.gz' \
  --exclude='*.tgz' \
  --exclude='*~' \
  --exclude='.[a-zA-Z]*' \
  --exclude=00-BACKUP \
  --exclude=JUNK \
  --exclude=OLD \
  --exclude=SAVE \
  --exclude=log \
  --exclude=logs \
  --exclude=out \
  --exclude-from=rsync-files-to-exclude.dir \
  --safe-links \
  "${extraops[@]}" \
  stolfi@manaus.ic.unicamp.br:${dir}/ ./
