#! /bin/bash 
# Last edited on 2017-01-01 06:40:46 by stolfilocal

# Fetch non-derived program files from manaus.ic.unicamp.br to cratera.

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

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

rsync -azvu \
  --exclude='*-old' \
  --exclude='*-out-*' \
  --exclude='*.a' \
  --exclude='*.eps' \
  --exclude='*.ho' \
  --exclude='*.log' \
  --exclude='*.o' \
  --exclude='*.pdf' \
  --exclude='*.ps' \
  --exclude='*.tar' \
  --exclude='*.tar.gz' \
  --exclude='*.tgz' \
  --exclude='*~' \
  --exclude='-ot-*' \
  --exclude='.[a-zA-Z]*' \
  --exclude='out-*' \
  --exclude='out_*' \
  --exclude='snap-*' \
  --exclude='*-snapshot' \
  --exclude=00-TARFILES \
  --exclude=COURSES \
  --exclude=Deps.make \
  --exclude=JUNK/debug \
  --exclude=MODPKG \
  --exclude=OLD \
  --exclude=OUT \
  --exclude=SAVE \
  --exclude=extract-ho-deps \
  --exclude=gmon.out \
  --exclude=log \
  --exclude=logs \
  --exclude=old \
  --exclude=ot \
  --exclude=out \
  --exclude-from=rsync-binaries-to-exclude.dir \
  --safe-links \
  "${extraops[@]}" \
  stolfi@manaus.ic.unicamp.br:${dir}/ ./

