#! /bin/bash
# Last edited on 2016-12-13 21:05:37 by jstolfi

bdate="$1"; shift; # Backup date for directory name

bdir=/media/jstolfi/KINGSTON/00-BACKUPS/vostro

if [[ ! ( -d ${bdir} ) ]]; then
  echo "** '${bdir}' not found or not a directory" 1>&2 ; exit 1
fi

tar -cvzf \
  ${bdir}/${bdate}.tgz \
  --exclude \
  --exclude='*.tar.gz' \
  --exclude='*.tgz' \
  --exclude='*~' \
  --exclude='projects/chemistry/*/*/*.mkv' \
  --exclude='.[a-zA-Z]*' \
  --exclude='i686-*' \
  --exclude=JUNK \
  --exclude=OLD \
  --exclude=SAVE \
  --exclude=old \
  --exclude-caches-all \
   bin lib elisp elisp-20 \
   bureau/pessoal Downloads papers programs projects \
   public_html sketchbook
  
