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