From 0f08d04698c814955116b6bae50752e64b774d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Thu, 23 Dec 2021 18:28:03 +0000 Subject: Thu Dec 23 06:28:03 PM UTC 2021 --- .bin/synchronize-ereader | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 .bin/synchronize-ereader (limited to '.bin/synchronize-ereader') diff --git a/.bin/synchronize-ereader b/.bin/synchronize-ereader new file mode 100755 index 0000000..482a846 --- /dev/null +++ b/.bin/synchronize-ereader @@ -0,0 +1,21 @@ +#!/bin/sh + +set -xe + +src_dir=$(readlink -f "${1}") +out_dir=$(readlink -f "${2}") + +[ -d "${src_dir}" ] +[ -d "${out_dir}" ] + +rsync -hvrPt \ + --delete-after \ + --fuzzy \ + --prune-empty-dirs \ + --include "*.pdf" \ + --include "*.epub" \ + --include "*.png" \ + --include "*.jpg" \ + --include "*/" \ + --exclude "*" \ + "${src_dir}/" "${out_dir}/" -- cgit v1.2.3