#!/usr/bin/perl -w

use strict;

my @urls = ("http://cdimage.debian.org/debian-cd/current/i386/iso-cd/",
	"http://cdimage.debian.org/debian-cd/current/i386/iso-dvd/",
	"http://cdimage.debian.org/debian-cd/current/amd64/iso-cd/",
	"http://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/",
	"http://cdimage.debian.org/debian-cd/current/multi-arch/iso-cd/",
	"http://cdimage.debian.org/debian-cd/current/multi-arch/iso-dvd/",
	);


my $i = 1;

foreach my $url (@urls) {
	my $torrentdir = $url;

	$torrentdir =~ s/iso-/bt-/;

	print `lftp -c "mirror $url ."`;
	# print "$url OK\n";
	print `lftp -c "mirror $torrentdir ."`;
	# print "$torrentdir OK\n";

	unless ($i++ > 1) {
		print `screen -d -m btlaunchmanycurses --check_hashes 0 --upload_unit_size 32768 .` ;
	}
}

# print "Done\n";

