From d64d4a6a3924e144fe49b3d956320b37786a738a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Fri, 14 Jan 2022 09:54:31 +0100 Subject: Fri Jan 14 09:54:31 AM CET 2022 --- .bin/create-local-backup | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 .bin/create-local-backup (limited to '.bin/create-local-backup') 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}/" -- cgit v1.2.3