Re: gtorrent script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/10/23 15:56, Linux for blind general discussion wrote:
This is an update to my gtorrent script.
When the script runs it runs quietly and saves output to gtorrent.log.
cut here:

#!/usr/bin/env bash
# file: gtorrent.sh - get torrents with aria2c.
# dependencies: aria2.
GF=gtorrent.inp
if test -f "$GF";  then
    aria2c --quiet=true --interface=eno1 --enable-color=false -Vtrue -lgtorrent.log -d/home/jude/Downloads --auto-file-renaming=false --allow-overwrite=true --bt-stop-timeout=60 --bt-max-peers=0 --bt-min-crypto-level=arc4 --bt-force-encryption=true --seed-time=480 --seed-ratio=2 --continue=true --input-file=gtorrent.inp

Wowe, you are the master of long lines, you might want to add at the end
of the command '|| exit $?'.

else
     echo "useage: put download torrent urls one per line in file gtorrent.inp and try again."

You are testing with '-f', which means that the else clause will be
executed is the file is not found.
The SCR is not testing to ensure that the file is correctly populated.

You should also exit with anon-zero exit value and redirect error
messages the output to STDERR.

To me this SCR is not to be used as such.

--
John Doe

_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/blinux-list




[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]