summaryrefslogtreecommitdiffstats
path: root/.bin/synchronize-ereader
blob: 482a846ee5a6d0fdbb8e465fee172b31b436f53f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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}/"
remember that computers suck.