SHOW:
|
|
- or go back to the newest paste.
1 | #!/bin/bash | |
2 | ||
3 | inotifywait -m /home/user/Downloads/torrent -e create -e moved_to | | |
4 | while read dir action file; do` | |
5 | if [[ "$file" =~ .*torrent$ ]]; then` | |
6 | echo "Found" && | |
7 | cp /home/user/Downloads/torrent/"$file" \ | |
8 | run/user/1000/gvfs/smbshare\:server\=fooo\,share\=smbserver/transmission/torrent/"$file" && | |
9 | rm /home/user/Downloads/torrent/"$file"; | |
10 | fi | |
11 | done |