dotfiles

My dotfiles, nothing really interesting to see ...
git clone https://git.onna.be/dotfiles.git
Log | Files | Refs | README

commit b92efc95f5ae4109e1f97c8c09812c3f899c7722
parent 777b73c3f26940a693b4cf9e332dd61461c05b7b
Author: Paco Esteban <paco@onna.be>
Date:   Tue, 23 Oct 2018 10:48:12 +0200

we can select more than one torrent now

Diffstat:
bin/bin/rarbg.pl | 15+++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/bin/bin/rarbg.pl b/bin/bin/rarbg.pl @@ -89,12 +89,15 @@ print "Which one? (Ctrl+C to quit) "; my $selection = <STDIN>; chomp $selection; -if ( $selection =~ m/\d{1,2}/ ) { - say "[*] You selected: " . $result->[$selection]->title; - say " [-] sending magnet to transmission:\n" - . $result->[$selection]->download; - my $magnet = $result->[$selection]->download; - `transmission-remote pippin.h.e1e0.net --authenv -a $magnet`; +if ( $selection =~ m/\d{1,2} ?/ ) { + my @selections = split(/ /, $selection); + foreach my $s (@selections) { + say "[*] You selected: " . $result->[$s]->title; + say " [-] sending magnet to transmission:\n" + . $result->[$s]->download; + my $magnet = $result->[$s]->download; + `transmission-remote pippin.h.e1e0.net --authenv -a $magnet`; + } } else { die "selection is not a number!";