fullArchive.sh 366 B

123456789101112131415
  1. #!/bin/bash
  2. if [ ! -d "${1}" ]; then
  3. echo "Usage: ${0} path" 1>&2
  4. exit 1
  5. fi
  6. # Clear last recode files every 15 days
  7. if [ $(( `date '+%-d'` % 15 )) -eq 0 ]; then
  8. find "${1}" -type f -name .lastFindRecode -size 0 -delete
  9. fi
  10. # Force archive encoding
  11. find "${1}" -maxdepth 2 -mindepth 2 -type d -print0 | \
  12. FULL_ARCHIVE=1 xargs -n 1 -0 ~/bin/video/folderToMKV.sh