From 899cbcef313cbc2abf53da4654976cdde06a7fe9 Mon Sep 17 00:00:00 2001 From: itec Date: Tue, 6 Jul 2021 15:49:42 +0200 Subject: [PATCH] Carica file su '' Initial commit --- tails_torrent.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tails_torrent.sh diff --git a/tails_torrent.sh b/tails_torrent.sh new file mode 100644 index 0000000..0737e39 --- /dev/null +++ b/tails_torrent.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +parent_path=$(dirname $(realpath $0)) +cd "$parent_path" + + +new=$(lynx --dump --nonumbers https://tails.boum.org/torrents/files/ | grep "\.torrent") +lastname=$(basename "$0" | cut -d. -f1).last + +old=$(cat $lastname) +#echo "$new" +#echo "$old" + + +if [ "$old" != "$new" ]; then + while IFS= read -r line; do + echo $line + transmission-remote --auth transmission:transmission --add $line --no-downlimit --no-uplimit --no-seedratio --download-dir /mnt/torrent/downloads/tails + done <<< $(echo "$new" | grep "^http") + + echo "$new" > $lastname +fi +