Wednesday, March 30, 2011

Download Alien Bob's multilib support packages

I've created a Perl script to download all slackware-current multilib support packages from here. Perl really makes you a lazy programmer. You can do unbelievable many things in just a few lines.
#!/usr/bin/perl -w

use LWP::UserAgent;
use strict;

sub get_links
{
my $url = shift;
my $page = LWP::UserAgent->new->get($url)->content;

map { m@/$@ && get_links($_) || system("wget -xnH $_"); }
map { "$url$_" } $page =~ m@<a href="(.+)">\1</a>@g;
}

my $url = "http://connie.slackware.com/~alien/multilib/current/";

get_links($url);

5 comments:

Tekkno Genius said...

lftp -c 'open http://slackware.com/~alien/multilib/ ; mirror current' is even lazier. One command :)

Nikos Skalkotos said...

Will this work recursively and traverse all the subdirectories?

Unknown said...

rsync -ruhv --progress --exclude=debug/ --include=*/ --include=*t?z --exclude=* rsync://taper.alienbase.nl/mirrors/people/alien/multilib/current/ ./

Unknown said...

i4h53o1z46 v8h83m4o44 e9k90l6j56 c0r54r5b36 j6v35n2n25 n0s17y6j08

Anonymous said...

GGDB
yeezy shoes
yeezy 350 v2
off white outlet
nike kyrie 7
jordan travis scott
kd 15
off white t shirt
kobe sneakers
curry shoes