From 70bbe2f78cb70a5a783c74d31979081b6f22ff11 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 1 Jun 2021 06:51:49 -0400 Subject: fix cptorrents --- cptorrents | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cptorrents b/cptorrents index 27bd8e1..89350cb 100755 --- a/cptorrents +++ b/cptorrents @@ -1,17 +1,17 @@ #!/usr/bin/env sh - -[[ ! $# -eq 1 ]] && echo "usage: cptorrents " && exit 1 +# +# usage: cptorrents [dir] dir=${1:-~/Downloads} files=$(find $dir -name "*.torrent") if [ -n "$files" ]; then - printf "selected torrents:\n$files\n\n" + printf "selected torrents from $dir:\n$files\n\n" read -p "ok? [Y/n] " reply case $reply in n | N | no | NO ) exit 1;; *) printf "syncing\n"; - rsync -av ${files[@]} ben@dev.simatime.com:/mnt/campbell/ben/torrents/in; + rsync -av "${files[@]}" ben@dev.simatime.com:/mnt/campbell/ben/torrents/in; rm $dir/*.torrent; exit 0; esac -- cgit v1.2.3