#! /bin/bash 
# Last edited on 2014-05-20 14:33:33 by stolfilocal

# To run in {cratera}.
# Fetch contents of {lib} directory from manaus.ic.unicamp.br to cratera.

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

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

rsync -azvu \
  --exclude='*.tar' \
  --exclude='*.tar.gz' \
  --exclude='*.tgz' \
  --exclude='*.so' \
  --exclude='*.so.*' \
  --exclude='*.a' \
  --exclude='*.la' \
  --exclude='MrSID' \
  --exclude='*~' \
  --exclude='.[a-zA-Z]*' \
  --exclude='i686-*' \
  --exclude=JUNK \
  --exclude=OLD \
  --exclude=SAVE \
  --exclude=old \
  --safe-links \
  --backup \
  --backup-dir=${HOME}/${dir}.`yyyy-mm-dd-hhmmss` \
  "${extraops[@]}" \
  stolfi@manaus.ic.unicamp.br:${dir}/ ./
 
