From 2a557572a10c566850143c085f1704c971454d98 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Sun, 26 Dec 2021 00:15:22 +0400 Subject: [PATCH] upload.ready.deluge.sh add g+rX --- bin/upload.ready.deluge.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/bin/upload.ready.deluge.sh b/bin/upload.ready.deluge.sh index 8a17ca0..4224475 100755 --- a/bin/upload.ready.deluge.sh +++ b/bin/upload.ready.deluge.sh @@ -1,16 +1,23 @@ #!/bin/bash set -x -if [ "$1" != "no-progress" ]; then - PROG=--progress -else +if [ "$1" == "no-progress" ]; then shift +else + PROG=--progress fi + +if [ "$1" == "xxx" ]; then + shift + /usr/bin/rsync -av --inplace --append-verify --exclude=.\*.parts $PROG $* /mnt/ssd/deluge/xxx hrat:tmp/x + exit +fi + if [ ! -z "$*" ]; then for i in "$@"; do - /usr/bin/rsync -av --inplace --progress --append-verify "/mnt/ssd/deluge/done/$i" "hrat:tmp/tmp/done/" + /usr/bin/rsync -av --chmod=o+rX 644 --inplace --progress --append-verify "/mnt/ssd/deluge/done/$i" "hrat:tmp/tmp/done/" done else - /usr/bin/rsync -av --inplace --append-verify $PROG /mnt/ssd/deluge/done hrat:tmp/tmp + /usr/bin/rsync -av --chmod=o+rX --inplace --append-verify $PROG /mnt/ssd/deluge/done hrat:tmp/tmp fi