diff options
author | Ben Sima <ben@bsima.me> | 2021-06-01 06:51:49 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2021-06-01 06:51:49 -0400 |
commit | 70bbe2f78cb70a5a783c74d31979081b6f22ff11 (patch) | |
tree | d63b11ff602bddbf4fc0cd1f1576705ca3212241 /cptorrents | |
parent | 7be93af15838c4d153ca5c6919d7e59cdaaa2904 (diff) |
fix cptorrents
Diffstat (limited to 'cptorrents')
-rwxr-xr-x | cptorrents | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,17 +1,17 @@ #!/usr/bin/env sh - -[[ ! $# -eq 1 ]] && echo "usage: cptorrents <dir>" && 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 |