From 8501ab5067ecd6724604690f9b7c276c24e843e5 Mon Sep 17 00:00:00 2001 From: Nemo Date: Wed, 28 Feb 2018 09:57:41 +0530 Subject: [PATCH] sync comics --- cbz-convertor.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cbz-convertor.sh b/cbz-convertor.sh index 3190cf9..9949e1a 100755 --- a/cbz-convertor.sh +++ b/cbz-convertor.sh @@ -1,4 +1,5 @@ #!/bin/bash + # Usage: Zips given directories into .cbz (Comic Book ZIP) archives of the smame name (eg "folder name.cbz"). COMIC_ROOT="/home/nemo/Downloads/Books/Comics" @@ -12,4 +13,11 @@ while read comic_dir; do echo "[DL] $comic_dir" cbz.sh -k "$comic_dir" > /dev/null fi -done < <(find . -mindepth 2 -maxdepth 2 -type d) \ No newline at end of file +done < <(find . -mindepth 3 -maxdepth 3 -type d) + +# Sync it as well +for dir in *; do + cd $dir + rsync --archive --include '*.cbz' --recursive * nemo@192.168.1.111:/mnt/xwing/media/EBooks/Comics/ --verbose --exclude '*.jpg' --exclude '*.png' --exclude '.sync' --prune-empty-dirs + cd .. +done