summaryrefslogtreecommitdiffstats
path: root/.bin/create-local-backup
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2022-01-14 09:54:31 +0100
committerRomain Gonçalves <me@rgoncalves.se>2022-01-14 09:54:31 +0100
commitd64d4a6a3924e144fe49b3d956320b37786a738a (patch)
tree4150edec412902cc11c73e7d619e40003de3b19e /.bin/create-local-backup
parenta380254393b2a1e08e4dd02e96e5c206a457ec59 (diff)
downloaddots-d64d4a6a3924e144fe49b3d956320b37786a738a.tar.gz
Fri Jan 14 09:54:31 AM CET 2022
Diffstat (limited to '.bin/create-local-backup')
-rwxr-xr-x.bin/create-local-backup24
1 files changed, 24 insertions, 0 deletions
diff --git a/.bin/create-local-backup b/.bin/create-local-backup
new file mode 100755
index 0000000..4e4cb1b
--- /dev/null
+++ b/.bin/create-local-backup
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -xe
+
+source_directories="./git.rgoncalves.se/
+ ./
+ "
+
+out_dir=$(readlink -f "${1}")
+
+[ -d "${out_dir}" ]
+
+exit
+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.