resilio doesn't sync symlinks, so copy and sync

This commit is contained in:
Nemo 2018-03-03 01:36:21 +05:30
parent 8501ab5067
commit f71c6adb99
1 changed files with 20 additions and 10 deletions

View File

@ -2,8 +2,10 @@
# Usage: Zips given directories into .cbz (Comic Book ZIP) archives of the smame name (eg "folder name.cbz").
# This is synced against Mi Manga Nu android app
# using resilio sync
COMIC_ROOT="/home/nemo/Downloads/Books/Comics"
COMIC_EXPORT_ROOT="/home/nemo/Downloads/Books/Comics-CBZ"
cd $COMIC_ROOT
while read comic_dir; do
@ -21,3 +23,11 @@ for dir in *; do
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
# Sync them to the local export directory
for dir in *; do
cd $dir
rsync --archive --include '*.cbz' --recursive * /home/nemo/Downloads/Books/Comics-CBZ/ --exclude '*.jpg' --exclude '*.png' --exclude '.sync' --prune-empty-dirs
cd ..
done