2025-03-16 16:13:47 +00:00
|
|
|
#!/usr/bin/env zsh
|
|
|
|
|
|
|
|
|
|
# Copy .torrent files to my server
|
|
|
|
|
|
|
|
|
|
local torrentFile="$1"
|
|
|
|
|
|
|
|
|
|
if [[ ! (-e $torrentFile) ]]
|
|
|
|
|
then
|
|
|
|
|
echo "The specified file does not exist"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ ! ($torrentFile =~ (torrent$)) ]]
|
|
|
|
|
then
|
|
|
|
|
echo "File specified must be a torrent file"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# rsync the file over
|
2026-04-12 11:24:18 +01:00
|
|
|
rsync --remove-source-files --compress --compress-choice=zstd --compress-level=22 $torrentFile minas-tirith:~/rtorrent/watch/start/
|
2025-03-16 16:13:47 +00:00
|
|
|
|