summaryrefslogtreecommitdiff
path: root/cptorrents
blob: a1f9415886044ec01f09150f2e2708ec1bc13959 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env sh

files=$(ls ~/Downloads/*.torrent)

if [ -n "$files" ]; then
    printf "selected torrents:\n$files\n\n"
    read -p "ok? [Y/n] " reply
    case $reply in
        n | N | no | NO ) exit 1;;
        *) printf "syncing\n";
           rsync -av ~/Downloads/*.torrent ben@$(cat ~/me/data/home-ip):/mnt/lake/ben/torrents/in;
           rm ~/Downloads/*.torrent;
           exit 0;
    esac
else
    echo "No torrents found."
    exit 1;
fi